Data adapter limit of 20 characters???
I have the following code.
VB Code:
Dim cn3 As New OleDb.OleDbConnection("Provider=SQLOLEDB.1;Integrated Security=SSPI;" _
& "Persist Security Info=False;" _
& "Initial Catalog=mcclure credit cards;" _
& "UID=;PWD=;" _
& "Data Source=Server7")
cn3.Open()
Dim datAdapt3 As New OleDb.OleDbDataAdapter("Select * From CustTransactions", cn3)
Dim commBuild3 As New OleDb.OleDbCommandBuilder(datAdapt3)
Dim datSet3 As New Data.DataSet
Dim datRow3 As Data.DataRow
datSet3.Clear()
datAdapt3.Fill(datSet3, "CustTransactions")
datRow3 = datSet3.Tables("CustTransactions").NewRow
datRow3.Item("Product") = Trim(DatRead1.Item("Product"))
datSet3.Tables("CustTransactions").Rows.Add(datRow3)
datAdapt3.Update(datSet3, "CustTransactions")
The SQL data dtarow3.item("Product") is a varchar field set at 50 characters.
When this code runs with data more than 20 characters long, I get the following error.
The statement has been terminated. String or binary data would be truncated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: The statement has been terminated. String or binary data would be truncated.
Is there a way to make it so this datrow field will except data great than 50 characters?
Thanks