VBScript ADO and SQL Server

Discussion in 'Scripting' started by sbillard, Aug 10, 2004.

  1. sbillard

    sbillard Guest

    Hi,
    I know for a fact that a string in VBScript
    can exceed 256 characters in length.

    I know for a fact that my SQL Server column
    is a varchar(2048).

    When I use ADO-OLEDB to INSERT data INTO my database
    the inserted string is truncated at 256 characters.

    VBScript string is complete, SQL Server column is big
    enough,
    but something gets lost during the execution of the
    INSERT statement.

    Has anyone seen this before? My MSDN searches aren't
    turning anything up that explains this behavior.

    Thanks in advance,
    SB
     
    sbillard, Aug 10, 2004
    #1
    1. Advertisements

  2. sbillard

    sbillard Guest

    Well, the test-case I prepared for you works just fine!

    There is no 256 limit.

    The data that is truncated at 256 characters is
    the .Message property of a security log event. The
    script is too complicated to post. It is strange that
    the same variable output to a log file and uploaded to
    SQL has two different values: Complete(log file) and
    Truncated@256(INSERT statement).

    There must be something else going wrong. Thanks for
    helping me pull my head out of my you-know-what.
    SB
     
    sbillard, Aug 10, 2004
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.