Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBCs SQLRowCount() - How to use?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00810276
Message ID:
00810435
Views:
19
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform