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:
00810422
Views:
28
>>In your code lnTally is not initialized, so it points nowhere. I guess it should be this way

Actually I did initialize them... I just didn't include it in the snippet.

&& initialize memvars
STORE -1 TO lhTest, lnResult, lnTally, lnSQLResult
STORE "" to lcSQL

>DECLARE SHORT SQLRowCount IN ODBC32 ;
> INTEGER StatementHandle, ;
> INTEGER @RowCountPtr
>
>lhTest = SQLSTRINGCONNECT("dns=DemoTDat;")
>
>IF lhTest > -1
> lcSQL = "SELECT * FROM dbc.tables ORDER BY CreateTimeStamp"
> lnResult = SQLEXEC(m.lhTest, m.lcSQL) && returns several hundred rows... obviously a good connection
>
> lnSQLResult = SQLRowCount(m.lhTest, @lnTally) && errors out
>
> SQLDisconnect(m.lhTest)
>ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform