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:
00810369
Views:
24
>Anatoily,
>
>>>DECLARE SHORT SQLRowCount IN odbc32;
> INTEGER StatementHandle,;
> INTEGER @ RowCountPtr
>
>Close... ever so close.
>
>When I run it in VFP 8 I get a VFP error: "Declare DLL call caused an exception"
>
>The call is running against a Teradata DBMS and I've verified that SQLRowCount is defined in the Teradata ODBC.
>Obviously I'm doing something wrong.
>
>
>Regards,
>Thom C.
>
>FWIW, here's my test code.
>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
Where do you initialize lnTally before passing it by reference?
censored.
Previous
Reply
Map
View

Click here to load this message in the networking platform