Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rs.Delete and rs.Update problems
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Rs.Delete and rs.Update problems
Miscellaneous
Thread ID:
00667296
Message ID:
00667296
Views:
53
Hi - we are currenty working on a VB6 SP5 front ended app with a VFP6 database. We have been quite happilly connecting to the database and opening recordsets and perform normal data operations ie. saving new records, saving edited records and deleting records... however... with one table (which we have dropped and re-created in an attempt to fix this) when we get a record set we are able to add new records ok but when we try to save an edited record we get the error "-2147217887 Multiple step OLE DB operation generated errors. Check the OLE...etc" also when we try to delete a record we get the error "-2147467259 [Microsoft][ODBC Visual FoxPro Driver]SQL: Statement too long."
I must stress this is happening in only one table (which we have re-created to no avail)
We have also tried creating different recordsets ie. rsTemp, rsDelete etc - here is some code...
the connection
Dim strProvider As String
Dim strDataBaseName As String
Dim strConnectionString As String
strProvider = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;"
strDataBaseName = "SourceDB=" & oAppPathToData & "\" & oAppDataBaseName
strConnectionString = strProvider & strDataBaseName & ";" & "Exclusive = No;"
If Len(Dir(oAppPathToData & "\" & oAppDataBaseName)) <> 0 Then
Set DB = New ADODB.Connection
DB.Open strConnectionString
DB.CursorLocation = adUseServer
If DB.State = adStateOpen Then
openDB = True
Else
openDB = False
End If
Else
openDB = False
End If
this is the function we use to get a recordset
Public Function getRSRW(rsGetName As ADODB.Recordset, strSQL As String) As ADODB.Recordset
Set rsGetName = New ADODB.Recordset
rsGetName.Open strSQL, DB, adOpenStatic, adLockOptimistic, adCmdText
Set getRSRW = rsGetName
End Function
we pass it this..
Call getRSRW(rsDelete, "select * from youthgroups where yg_primary = " & intDelete)
and the update occurs here
rsContacts.Update
and the delete error occurrs here...
rsDelete.Delete
Any ideas greatly appreciated - we are desparate!!!
Thanks
Chris
Ps I posted this is both VB and VFP forums because I am not even sure whether it's a VB issue or a VFP issue...
Chris Maiden
Email
Web
Next
Reply
Map
View

Click here to load this message in the networking platform