Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Driver vs more recent ODBC driver
Message
From
21/11/2018 10:47:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01663573
Message ID:
01663606
Views:
69
>>>SQL Server native client 11.0 is not working correctly with varchar(max) column. I think that was the reason we used that driver. However, I think ODBC driver (the latest version) should work for us (it seems to be working correctly for varchar(max) and we're not using date columns, so we should be OK).
>>
>>SQL Server native client 11.0 is working correctly with varchar(max), probably you meant the other way (SQL Server driver not working correctly with many newer data types including varchar(Max)).
>>
>>PS: Problem is with using ODBC, try using OLEDB instead (it will not be supported in future SQL versions but that is more reliable to be used from VFP).
>
>Found this thread which is a bit old:
>
>https://support.west-wind.com/Thread4761F6U59.wwt
>
>I'm guessing we would need to re-test - we're using DSN for our connections.

You should search for old threads here. I think you missed the PS I wrote. ODBC is problematic, use OLEDB. I have given numerous demo code with varchar(Max), Image, varbinary(MAX), date ... that shows the problem. Actually even SP2 had a fix after a problem report here. With ODBC, it is possible to overcome those using properties but complex IMHO. There was a thread about this exact issue, showing the solution as well (many years ago, I hope you ca search for it).

I have been using OLEDB successfully for years.

In case of ODBC and varchar(max), it is VFP's fault not drivers'. You can explicitly cast() the value to one that VFP understands (say, cast(... as varchar(8000) just as a sample).

DSN- less is better:)
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform