chairyuan
Member
I have an Access Database, and write a small program to update a table (A) using linked table (LINK_B). (I need some other steps to do, so Im using VB, not VBA in Access)
When I try to run a Query from VB to update table A, I always get the error:
"The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data."
But when I run that query within Access, it works fine.
If I limited the link_b to <10 records, its Ok either.
What should I do?
When I try to run a Query from VB to update table A, I always get the error:
"The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data."
But when I run that query within Access, it works fine.
If I limited the link_b to <10 records, its Ok either.
What should I do?
Code:
Private Sub dtnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtnLoad.Click
Connection = New OleDbConnection(ConnectionString)
Connection.Open()
DBCommand = New OleDbCommand()
DBCommand.Connection = Connection
DBCommand.CommandText = "Qry_LoadFromAS400"
DBCommand.CommandType = CommandType.StoredProcedure
Try
DBCommand.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Connection.Close()
DBCommand = Nothing
Connection = Nothing
End Sub