1
votes

In one of my application am using Delphi 7, Sql server 2008 R2, BDE, I connect database using bde via odbc using Sql server native client driver.

Insert always works but some places edit failled, Delphi raise EDBEngineError [Sql native client 10.0] String Data Length Mismatch.

I have 4 text fields(sql data type TEXT) in table, if i comment those fields lines the edit works.

Please any one help to resolve this problem?

I know BDE is depreciated, but this is database migration. this is large application so i dont want to change from BDE. Everything is working fine except above situation.

[excuse for my bad english]

1

1 Answers

0
votes

I am afraid BDE is the reason here. BDE was never designed to work with SQL Server 2008 or higher. We've recently had a similar problem here with informix (access violations that also had to do with wrong string lengths).

What you could do to really be sure if BDE is the problem, is capture the sql-statement that gets the string length error, and execute the same SQL using the ODBC-driver directly without the BDE-layer in between (e.g. from some SQL-editor that connects through ODBC). I bet you don't get the problem anymore.