Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not sure why this Update is failing
Message
From
25/02/2003 11:42:18
 
 
To
25/02/2003 11:32:10
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00757600
Message ID:
00757609
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
Kev,

My guess is something in your table that doesn't allow NULLs ...

~~Bonnie


>Hi
>
>I'm trying to insert a new record to a VFP table via VFPOLEDB and I keep getting the following error:
>
>
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in microsoft.visualbasic.dll
>
>Any ideas what it is, here is my code:
>
>
'Code following Dim statements
>objHistoryDS = New DataSet()
>objHistoryConn = New OleDbConnection("Provider=VFPOLEDB.1;Data Source="c:\dev\cms600\data\ccmshistorical.dbc")
>objHistoryCommand = New OleDbCommand("SELECT * FROM Historical_Client", objHistoryConn)
>objHistoryDA = New OleDbDataAdapter(objHistoryCommand)
>objHistoryCB = New OleDbCommandBuilder(objHistoryDA)
>objHistoryDA.InsertCommand = objHistoryCB.GetInsertCommand
>objHistoryDA.Fill(objHistoryDS, "Historical_Client")
>objRow = objHistoryDS.Tables("Historical_Client").NewRow
>objRow("Cl_PrimaryRef") = "Test"
>objHistoryDS.Tables("Historical_Client").Rows.Add(objRow)
>
>'This is what causes the error!
>objHistoryDA.Update(objHistoryDS, "Historical_Client")
>
>Thanks in advance
>
>Kev
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform