>And I am assuming that in the database, you have defined the field size to
>be at least varchar(404)?
Effectively yes; my listing here showed 400, but I've been using 390.
The point is that ANY value in excess of 255 characters fails to
write, regardless of how the column is actually configured in the
table.
I've tried working around this by using the Execute method on the
connection and entering an UPDATE SQL command, but that bombs out with
an error from the ODBC provider that the element in question (the
string in this case) can't be longer than 128 characters, even though
the **IDENTICAL** SQL works perfectly from the SQL Server Query
Analyzer...
Is ANYBODY getting long strings into a SQL Server 7 database through
ADO using VBScript? This is driving me insane...
>Joe
>> I have no idea what I'm doing wrong. I'm trying to save a 400
>> character long string to a field through the recordset interface. The
>> VB code snippet is:
>> rsBuild("Brief") = Left(strBrief, 400)
>> It fails with the helpful message, "Error occurred" and references
>> that line number. The string is fine, and the database column is
>> designed for it.
>> BUT... If I change the Left value to 255 it works, and fails again
>> beginning at 256, so I smell a limit somewhere, but I can't find any
>> such limit documented. VB strings certainly aren't limited to 255
>> characters...
>> Any ideas? Suggestions?