Using sql insert with memo field truncates text data

  • Thread starter Graham Meredith
  • Start date
G

Graham Meredith

I'm using ASP to write a load of entries to an Access 2000 db
One of the fields, a memo field, however is getting truncated data - the
description field in the code below.
The description field is always truncated to about 300 chars
The string data in this array varies from nothing to a few thousand
characters and doesn't contain any carriage returns - just text and the odd
html tag

Anyone any ideas? I've seen alot of probs with querying memo fields and
returning truncated values but not while writing them..

Set oDB = Server.CreateObject("ADODB.Connection")
oDB.Open "DSN=ImageLib;UID=;pwd=;"

For n = 1 to numPhotos

SQL = "INSERT INTO PHOTOS (ID,Filename,SeriesID,SectionID,Description)
VALUES ("
SQL = SQL + Trim(CStr( n )) + ", '"
SQL = SQL + photoPAK_Filename(n) + "', "
SQL = SQL + Trim(CStr( photoPAK_SeriesID(n) )) + ", "
SQL = SQL + Trim(CStr( photoPAK_SectionID(n) )) + ", '"
SQL = SQL + photoPAK_Desc(n) + "')"

oDB.Execute SQL
----
 
G

GVaught

I would use & rather than + in your SQL statements. Ensure you are using
POST rather than GET to send your data to the database. GET string size is
much smaller than POST statements. Search on Google for inserting BLOB data
into an Access database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top