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:
00810428
Vues:
17
>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
The handle you are using is the internal VFP handle, this might not be the same as the handle (SQL_HANDLE_STMT) expected by the ODBC driver API function. Do you know for certain that the VFP handle can readily be substituted as desired above?
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform