Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Opening ADO Recordset
Message
From
22/11/2002 11:08:08
 
 
To
21/11/2002 23:57:13
Alhad Marathe
Asm Consulting
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00725619
Message ID:
00725810
Views:
13
Remove the error trap or implement Terry's suggestion to obtain the source OLE error from ADO, then post it here.

Your code looks good, assuming your connection is open and the "Photographers" table exists. The only thing there is that adOpenDynamic is not compatible with adUseClient, but usually ADO ignores that and adjusts the CursorType setting.

>I am trying to upload data from VFP tables into SQL server using ADO
>
>I can open the connection, but opening the recordset gives an error.
>
>My code is something like this.
>
>**
>local ERR
>on Error ERR = .T.
>With oNewphotoRS
> .ActiveConnection = oConnection
> .Source = "Photographers"
> .CursorLocation = adUseClient
> .LockType = adLockBatchOptimistic
> .CursorType = adOpenDynamic
> .CommandType = adcmdTable
> .Open()
>EndWith
>**
>IF Err
> WAIT WINDOW "Error opening recordset"
>ENDIF
>**
>
>What I am doing wrong here. I am using VFP 7.
>
>TIA
>
>Alhad
Previous
Reply
Map
View

Click here to load this message in the networking platform