Oops! Sorry, I fixed it.
I have a project where one requirement is to allow users to enter up to 3000 characters in an Access field. I then run a routine to update the data into SQL Server using the following:
ODBC connection in VBA:
CONSQLSVR = "ODBC;Driver=SQL SERVER;SERVER=;UID=;PWD=" & Password & ";Database=;"
Create a linked table and run a simple select into statement on the linked table from the Access table:
Set tdf = CurrentDb.CreateTableDef("dbo_cr_DataFromReview") tdf.Connect = CONSQLSVR tdf.SourceTableName = "dbo.cr_DataFromReview" CurrentDb.TableDefs.Append tdf 'Update CR with Review RUG data strSQL = "INSERT INTO dbo_cr_DataFromReview SELECT * FROM qryEditRUGItems;" DoCmd.RunSQL strSQL
this all works fine, but unfortunately data is being truncated. I link the table into Access from SQL Server and the linked table refuses to allow more than 255 characters in the target column. I have tried several different datatypes in SQL Server:
nvarchar(3500)
nvarchar(MAX)
varchar(MAX)
ntext
none of this helps. Access just refuses to believe me.
Any ideas?