I think I am running into the known bug
http://support.microsoft.com/kb/325765/en-us
trying to update multiple nvarchar values (SQL_C_WCHAR) via ODBC.
After SQLBindParameter() and SQLExecute() and SQLParamData() and
SQLPutData() on the first value, SQLParamData() fails on the second value
with state 22026 and message (in German)
"[Microsoft][ODBC SQL Server Driver]Zeichenfolgedaten mit ungültiger Länge"
The error occurs with SQL Server 2000, 2005 (SP 3) and 2008.
The workaround described in the KB article works: Inserting the values as
SQL_C_CHAR. But that' s not possible.
Is the hotfix mentioned in the article available or are there any other
remedies?
Thanks in advance
Julia
But first, the first thing to do would be to verify that you're still on
MDAC 2.7 (or lower). If you have applied all the latest updates, you should
be at MDAC 2.8 or higher (2.81). Also, you don't tell us on which operating
system (at the client) this error is happening.
Finally, you should try with the latest ODBC driver available: the Native
Provider; available in in the SQL-Server 2008 Feature Pack:
--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
"Julia Neumann" <Julia Neu...@discussions.microsoft.com> wrote in message
news:B20A546F-52DA-4C95...@microsoft.com...
> Hello,
>
> I think I am running into the known bug
> http://support.microsoft.com/kb/325765/en-us
> trying to update multiple nvarchar values (SQL_C_WCHAR) via ODBC.
>
> After SQLBindParameter() and SQLExecute() and SQLParamData() and
> SQLPutData() on the first value, SQLParamData() fails on the second value
> with state 22026 and message (in German)
> "[Microsoft][ODBC SQL Server Driver]Zeichenfolgedaten mit ung�ltiger
> L�nge"
"Sylvain Lafontaine" wrote:
> I suppose that this hotfix is still available from Microsoft. Did you
> contact them?
I'm planning to do that now.
> But first, the first thing to do would be to verify that you're still on
> MDAC 2.7 (or lower). If you have applied all the latest updates, you should
> be at MDAC 2.8 or higher (2.81). Also, you don't tell us on which operating
> system (at the client) this error is happening.
The client's operating system is Windows XP SP 3.
The error occurred with driver version 2000.85.1132.00.
But the same error occurs with the latest driver 2007.200.2531.00:
[Microsoft][SQL Server Native Client 10.0]String data, length mismatch
I think I have to ask for the hotfix.
Julia