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:44:56
 
 
To
25/02/2003 11:42:18
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00757600
Message ID:
00757612
Views:
8
>Kev,
>
>My guess is something in your table that doesn't allow NULLs ...
>
>~~Bonnie

Yep, just after I sent this message (typical!) I tried the same call from VFP through ADO and that gave me the meaningful message I was looking for.

I hope there is a way of excluding NULLS being placed into the fields from VB, rather than having to change my VFP table?

Thanks
Kev
>
>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform