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
02:36:26 PM
3F70VB3U3 Show this entire thread in new window
Gratar Image based on email address
From:
To:
Attachments:
None

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