MS-SQL ntext field retrieval over odbc

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyc
Posts: 2
Joined: Tue Jan 11, 2011 12:34 pm

MS-SQL ntext field retrieval over odbc

Post by andyc » Tue Jan 11, 2011 12:58 pm

Hi there,
I've got an app that retrieves data from a MSSQL server instance. The only field in the database concerned is of type ntext. There are three rows as follows:

Row 1 here
Row 2 here
ümlaut

When I have my app running on a mac and I log the number of bytes retrieved I get 10, 10 and 6. I also print the results of the query to a text file an I get the expected results, the rows as stated above.

However, when I run the same app on a windows machine using the same DSN settings as on the mac I get a byte count of 1 for each row and the output is as follows:

R
R
ü

On the windows machine I am using the built in odbc drivers, on the mac I am using drivers supplied by ActualTech.

In the dsn setup on windows I have unticked all options on the final config screen, so there is no character translation or any other options on. I have tried various combinations of these options. These settings are also all set to be off on the mac.

Has anyone ever come across anything similar?

Thanks a lot - Andy

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: MS-SQL ntext field retrieval over odbc

Post by bangkok » Tue Jan 11, 2011 3:44 pm

Here is the answer . look at my message :

http://forums.runrev.com/phpBB2/viewtop ... =12&t=4805

:D


It's a problem of RunRev version.

andyc
Posts: 2
Joined: Tue Jan 11, 2011 12:34 pm

Re: MS-SQL ntext field retrieval over odbc

Post by andyc » Tue Jan 11, 2011 4:11 pm

Thanks for that but I initially hit the issue when running Rev 4.0 then I updated to Livecode 4.5 in the hope that it might help but I still get the same problem. :(

Anyone else got any ideas?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: MS-SQL ntext field retrieval over odbc

Post by bangkok » Tue Jan 11, 2011 6:34 pm

andyc wrote:Thanks for that but I initially hit the issue when running Rev 4.0 then I updated to Livecode 4.5 in the hope that it might help but I still get the same problem. :(
Which version have you tried exactly ? 4.0 dp1 ? 4.0 gm1 ? 4.5 dp1 ? 4.5.2 etc ?

By the way, do you use the "query builder" ?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: MS-SQL ntext field retrieval over odbc

Post by Janschenkel » Tue Jan 11, 2011 9:51 pm

Is it possible the column is defined inside MS SQLServer as UTF-16 encoded? That could result in 'null' characters in the return value string; LiveCode is written in C/C++, where the null character is actually the end-of-string marker; this may be what is tripping up the data retrieval.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply