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
from Maui, Hawaii