Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapters and VARCHAR(MAX) columns in SQL
Message
From
04/06/2008 01:08:40
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
03/06/2008 20:55:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01321461
Message ID:
01321501
Views:
42
Similar to your experiences with views Olaf Doschke found out (free translation from his mail)

using cursoradapter with
ConnectionString: DRIVER={SQL Native Client};SERVER=...;Trusted_Connection=YES;DATABASE=...
at least sometimes receives a GUID with CHR(0) as last (wrong) char (732BA690-31BB-4EEB-899E-82B8F7CC4C37) with CHR(0) instead of 7.
Changing field order *can* fix the error, but other errors sometimes crop up. With the old ODBC-Driver everything is OK, irrelevant of field order :
ConnectionString: DRIVER={SQL Server};SERVER=...;Trusted_Connection=YES;DATABASE=...

Perhaps Olaf will chime in here on whether he uses VarChar in the query, but also in cursoradapter ODBC seems safer for the moment.

regards

thomas


>There is something about the SQL Native Client that make VARCHAR(max) fields useless with VFP - at least with remote views that is the case. The SQL ODBC works as expected. Perhaps this is related to the issue you've got here, if you are using SQL NativeClient for your conneciton.
>
>>I ran across an issue today creating a cursor adapter. I wanted to map a datetime in SQL to a date in VFP, so I
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform