please help MySQL varchar length setting.

Discussion in 'MySQL' started by JJnacy, Aug 7, 2009.

  1. #1
    Hi, I am new to MySQL
    I have problem about setting MySQL varchar length.
    It is ok for me to set varchar length 250 => varchar(250) and this works fine
    But when I set it varchar length 300 => why it became "text"
    and it not worked for my script and it showed error message :
    [ODBC Driver Manager] Invalid string or buffer length

    Please help:
    I need varchar(300) to run my script.
    How to set the MySQL table?


    Thanks,
     
    JJnacy, Aug 7, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    jestep, Aug 7, 2009 IP
  3. JJnacy

    JJnacy Peon

    Messages:
    448
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Still need help.

    I tried blob and text but all not working.

    BLOB or TINYBLOB error message:
    Provider error '80040e21'
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    line 2637 =>rs("Str1")=left(Str1,300)


    TEXT and TINYTEXT error message:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    [Microsoft][ODBC Driver Manager] Invalid string or buffer length
    line 2652 => rs.Update


    What I missed something?

    THanks,
     
    JJnacy, Aug 7, 2009 IP