>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only