Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
URGENT - Passing an ADO recordset to a SQL sproc
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00697020
Message ID:
00697459
Vues:
14
Hi J.C.,

I like this idea...and the insert/update/delete sprocs are *not* required if I can find a better/faster way.

Quick question, though --

I know this works if the recordset was obtained as the result of a SELECT statement passed through the ADO recordset object. Does this also work if the recordset was obtained as the result of a SQL sproc passed through the ADO *command* object? (this way of obtaining recordsets IS required, and is used heavily by several apps that utilize this COM object)

As a side question -- do you know how one might set the CursorType and CursorLocation properties of the returned recordset when it is obtained in the same manner (ie, from a sproc through the ADO command object)?

Many thanks for all your assistance...


>Unless the stored procedure is required, you can do this with a disconnected, batch-updatable recordset. You can obtain an empty recordset from SQL, have it updated at the client and send it back through the COM object with the recordset's UpdateBatch method. No stored procedure required.
>
>See the thread "Using Disconnected Recordsets" from today for some code on how to open the recordset. HTH
>
>>Hi gang,
>>
>>This one's important, and I need a solution *fast*.
>>
>>I have an ADO recordset, containing new data. I need to *pass* this recordset, from a VFP COM object I've created, to a SQL stored procedure, which will INSERT these rows into a single SQL table.
>>
>>How the (expletive deleted) do I pass this recordset so that the stored procedure can see it, recognize that it's an ADO recordset, and insert the rows? Or, alternately, should I maybe spin through the recordset and build an array to pass instead of the recordset -- but then, doesn't COMARRAY() get its ugly head into the mix?
>>
>>Using remote views or SPT is not an option, BTW (it's a LONG story, don't ask)(g)
>>
>>(Aside: I'll also be sending a different recordset to UPDATE rows, but I think if I can get the INSERT, I can figure out the UPDATE part.)
>>
>>*ANY* help is -greatly- appreciated, since I'm under the gun on this one.
>>
>>TIA,
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform