Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter duplicates record
Message
 
To
16/09/2009 09:41:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01424271
Message ID:
01424716
Views:
34
>>Last parameter in CA.CursorFill must be ADODB.Command when you use parameters:
>>
>>*** loCursorAdapter.CursorFill(.F., .F., 0, loRs)
>>loCursorAdapter.CursorFill(.F., .F., 0, loCmd)
>>
>
>
>Hi Borislav,
>
>According the VFP Help(see below), the last parameter cat be an ADO Command or an open RecordSet object. So I use RecordSet.
>Now I change to ADODB.Command and the problem don't occurs.
>
>Thinks about this help.
>
>
>CursorAdapter.CursorFill( [ lUseCursorSchema [, lNoData [, nOptions [, Source ] ] ] ] )
>
>Source
>Specifies a reference to an ADO Command or an open RecordSet object.
>
>The ADO Command object must have its ActiveConnection property set to the appropriate and already open ADO Connection object. When an ADO Command object is passed to Source, Visual FoxPro sets the ADO Command CommandText property to value of the CursorAdapter SelectCmd property. Visual FoxPro parses any parameters in SelectCmd, and creates and sets parameter values in the ADO Command object. CursorFill method then executes in the following manner:
>



Yep, but That part (in bold) is essential:
The ADO Command object must have its ActiveConnection property set to the appropriate and already open ADO Connection object. When an ADO Command object is passed to Source, Visual FoxPro sets the ADO Command CommandText property to value of the CursorAdapter SelectCmd property. Visual FoxPro parses any parameters in SelectCmd, and creates and sets parameter values in the ADO Command object. CursorFill method then executes in the following manner:

When you pass RecordSet there is NO parameter object in it.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform