Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: SQL pass-through and nvarchar(max) null characters

$
0
0
Re: SQL pass-through and nvarchar(max) null characters
SQL Programming
Re: SQL pass-through and nvarchar(max) null characters
01/31/2012
03:28:25 PM
3F70X5YR3 Show this entire thread in new window
Gratar Image based on email address
From:
To:
Attachments:
None

When you install SQL Server locally it will install client libraries.

You can find the downloads here. I think what you want is the Microsoft Sql Server 2008 Native Client on that page.
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16177

I think you can check the driver versions in the ODBC Data Source Administrator (type ODBC into the Windows 7 Run box).

+++ Rick ---


Thanks for the reply Rick.

How can I make sure I'm using recent SQL Server drivers? Would that in ODBC somewhere?

- Dave



I tried this:

DO wconnect LOCAL loSql as wwSql loSql = CREATEOBJECT("wwSql") ? loSql.Connect("database=WestwindAdmin") pcValue = REPLICATE("0123456789",500) ? loSql.Executenonquery("Insert into test (value) values (?pcValue)") ? loSql.Execute("select * from test") showText(tSqlquery.value)

where the value field in the test table is nvarcharmax and I don't get any nulls in the data.

Make sure you're using recent SQL server drivers that support nvarchar(max). When in doubt, hook up the SQL Server Profiler and check what FoxPro is sending up to the server.

+++ Rick ---


I just changed a field in my SQL Server database to an nvarchar(max) - and now find that when I use SQL pass-through from VFP 9 to write a large amount of text, it is embedding a null character [chr(0)] ever 4096 characters.

Anyone else run into this? And if so, how did you deal with it?

Thanks - Dave




Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii



Viewing all articles
Browse latest Browse all 10393

Trending Articles