If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using sql insert with memo field truncates text data
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 ---- |
#2
|
|||
|
|||
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. -- G Vaught "Graham Meredith" wrote in message ... 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 ---- |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Images in a database | Franz | General Discussion | 10 | October 7th, 2004 09:35 AM |
Enter data in 1 text form field & have multiple locations filled i | James | General Discussion | 4 | August 12th, 2004 10:02 PM |
Vanishing data in form field of memo type | MargaretM | New Users | 12 | July 14th, 2004 03:50 PM |
Text field causing trouble in query (continued) | KaiRich | Running & Setting Up Queries | 2 | May 28th, 2004 01:03 PM |
Chart Source Data Ranges Changing when Data Sheet updated from text file source. | Tekn0 | Charts and Charting | 3 | January 8th, 2004 05:45 PM |