May 21, 2008 at 9:58 am
Hi all
First time I have posted anything.
i am desparately trying to seek an answer to what I thought would be a common problem.
Using ACCESS 2000 linked to SQL SERVER 2000 via ADO. When using SQL INSERT command in my VBA - the data in the MEMO field seems to get truncated when it transfers the data to the SQL table on the server.
I have replaced the SQL linked table with a local ACCESS table and can quite happilly transfer 1000's of characters to it but when linked to the SQL table on the server - I only seem to end up with 252 characters!
The control that is used to enter the data is a text box and the ACCESS field is a MEMO type. The SQL TABLE field is nTEXT - although have tried other types and still getting same result.
All I can think of was the ODBC driver is at fault - version SQL Server 2000.85.1117.00, 04/08/2004 (SQLSRV32.DLL)
The code i am using is as follows: (not used quotes as not sure if this post will accept them)
DIM CN as ADODB.Connection
SET CN = NEW ADODB.Connection
SET CN = CurrentProject.Connection
INSERTSQL = 'INSERT INTO ' & SQLTable & ' (' & myfields & ')'
INSERTSQL = INSERTSQL & ' VALUES (' & myvalues & ')'
CN.Execute INSERTSQL
Any help would be much appreciated, thankyou
Daniel Goss
July 22, 2008 at 10:49 am
Try using a VARCHAR(length) for your SQL table field type.
July 23, 2008 at 6:45 am
The SQL equivalent of an Access memo field is I think VARCHAR(MAX).
Chris
Do not write in this space.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply