TADOQuery Error While Executing The SQL Second Time

  • HI,

    I came across this query as i am facing similar kind of issue in Delphi (C++ builder 2007) cannot give source code details as it is a legacy code, but issue is when  i am connecting to Database using below connectionstring:

    ConnectionString=Provider="MSDASQL.1";Persist Security Info="False";Data Source="ODBCDSN";Initial Catalog="MyDBName"

    Iam getting below error when iam trying to execute a INSERT query (using TADOQUERY)

    ExecSQL Exception: [Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation

    only when it is containing huge binary data (in DB column is Varbinary(max) and in delphi it is managed using Blob(checked code no issues with memory and buffer)

    also, same things are working if Iam connecting to DB using below connection string

    ConnectionString=Provider="SQLNCLI11";Data Source="'SQLSERVERNAME'";Initial Catalog="'MyDB'";Integrated Security="SSPI";Persist Security Info="False" the same code is working fine .

     

     

     

  • HI,

    I came across this query as i am facing similar kind of issue in Delphi (C++ builder 2007) cannot give source code details as it is a legacy code, but issue is when  i am connecting to Database using below connectionstring:

    ConnectionString=Provider="MSDASQL.1";Persist Security Info="False";Data Source="ODBCDSN";Initial Catalog="MyDBName"

    Iam getting below error when iam trying to execute a INSERT query (using TADOQUERY)

    ExecSQL Exception: [Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation

    only when it is containing huge binary data (in DB column is Varbinary(max) and in delphi it is managed using Blob(checked code no issues with memory and buffer)

    also, same things are working if Iam connecting to DB using below connection string

    ConnectionString=Provider="SQLNCLI11";Data Source="'SQLSERVERNAME'";Initial Catalog="'MyDB'";Integrated Security="SSPI";Persist Security Info="False" the same code is working fine .

     

     

     

  • This was removed by the editor as SPAM

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply