#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    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"
  2. #2
  3. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    Maybe it's some limitation with the ado text driver. I've never used that driver.
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0
    I managed to solve this issue. Thanks for the help.
  6. #4
  7. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    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
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0
    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.
  10. #6
  11. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    Thank you for the update I'm glad it's working for you.
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

IMN logo majestic logo threadwatch logo seochat tools logo