Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBCs SQLRowCount() - How to use?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00810276
Message ID:
00810435
Vues:
20
>To All,
>
>I've just stumbled across the ODBC SQLRowCount() function, but I'm not sure how to call it from VFP. Yes, I did RTM, but I still can't figure it out.
>
>I tried
>m.lnTally = SQLRowCount()
>but of course VFP doesn't recognize that function.
>
>I tried
>m.lnTally = SQLExec(, "SQLRowCount()")
>and I got an ODBC error: "Syntax error: expected something between the beginning of the request and the word 'SQLRowCount'"
>
>Has anyone been able to successfully use this ODBC function?
>
>Regards,
>Thom C.

Generally speaking you need a really good reason to drop down into low level API stuff.

Why are you doing a SQL Select, but not specifying the third parameter to SQLEXEC(), that is, the name of the cursor to store the results in? By default it will be called SQLRESULT. Why not just do a RECCOUNT() on this cursor?

The connection handle (1st param to SQLEXEC) is not optional. If your SQL command is an Insert, Update or Delete then you are not expecting a result set, so the third parameter is not required.

There are no references to SQLRowCount() in the VFP help, so which manual have you been reading?
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform