cancel
Showing results for 
Search instead for 
Did you mean: 

Querying SQL Anywhere using RODBC

Former Member
3,985

I am using the RODBC library and the following query has no problem:

sqlQuery(channel,"Select Surname, City, Country from Contacts", max=5)

 Surname         City Country

1 Hildebrand Kanata USA 2 Simmon Kitchener USA 3 Critch Yale USA 4 Lambert Phillipsburg USA 5 Sullivan Uxbridge USA

However the modified query has error (runs ok in iSQL)

> sqlQuery(channel,"Select Surname, City, Country from Contacts where state='CA'", max=5)

Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed

I am trying to see if there is a way to fix it.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Thanks vlad (late but never too late) for the suggestion. This finally works at least for SQL Anywhere 17 on Windows 10. http://hodentekmsss.blogspot.com/2016/09/trick-to-querying-sap-sql-anywhere.html