August 8th, 2012, 04:45 PM
-
Recordset is truncated after 255 characters
I'm trying to read a CSV file into a database using classic ASP. The fields work ok apart from the description field is truncated after 255 characters. Even when I display the field straight after the below command the same issue happens. Looking at the CSV file, nothing seems to be stopping it after 255 characters i.e. carriage returns. A sample of the CSV file is below.
Code:
set myRS = myConn.Execute("SELECT [Description] FROM [Text;DATABASE=" & Server.MapPath("/fpdb/") & ";HDR=Yes].[PRD_new.csv]")
Do While not myRS.EOF
response.write(myRS("Description"))
myRS.MoveNext
Loop
(CSV file)
Description
"Many wiki communities are private, particularly within enterprises. They are often used as internal documentation for in-house systems and applications. Some companies use wikis to allow customers to help produce software documentation.[25] A study of cor"
August 9th, 2012, 12:07 AM
-
Maybe it's some limitation with the ado text driver. I've never used that driver.
======
Doug G
======
I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
August 13th, 2012, 12:08 PM
-
I managed to solve this issue. Thanks for the help.
August 13th, 2012, 02:14 PM
-
Originally Posted by frasersales-ltd
I managed to solve this issue. Thanks for the help.
I'm glad you got it solved. What was causing the problem?
======
Doug G
======
I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
August 14th, 2012, 12:57 PM
-
There was nothing wrong with the sample CSV file. There was just an error in my code. To prevent the description from being truncated after 255 characters. Some of the descriptions were blank so I deleted those and saved the CSV file. Now it's adding more than 255 characters to the database field.
August 14th, 2012, 05:08 PM
-
Thank you for the update I'm glad it's working for you.
======
Doug G
======
I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton