List Info

Thread: DBI don't respond after SQL execution failure




DBI don't respond after SQL execution failure
user name
2005-12-28 21:53:48

Hi,
 ;  I am using Active Perl 5.8.7.815, SQL Server 2000 / MSDE, and ODBC. When I have a DBI execute() failure with following error

[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated. (SQL-22001)
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated. (SQL-01000)(DBD: st_execute/SQLExecute err=-1)

After that failure, I have a DBI::ping call to verify the DB connectivity, which hangs and never returns.

I tried to replace DBI::ping with a simple sql statement execute, which also hangs.
Is there anyway I can check the status of $sth or $dbh after the failure?

Or do I need to do any cleanup after failure?

How can I avoid this kind of hanging problems.
How can I diagnose to see where it is failing?

Thanks,
Kumar Talinki

DBI don't respond after SQL execution failure
user name
2005-12-28 22:35:14
>   I am using Active Perl 5.8.7.815, SQL Server 2000 /
MSDE, and ODBC.
>When I have a DBI execute() failure with following error
>
>[Microsoft][ODBC SQL Server Driver][SQL Server]String or
binary data
>would be truncated. (SQL-22001)

The error message as such, means that you are trying to cram
more
characters into a char/varchar/binary/varbinary columns then
you
have space for. If you can accept truncation, you can issue
SET
ANSI_WARNINGS OFF, and the error message will go away.
However, there
are some features that are not available with this setting -
queries
to linked servers and indexes on views and computed columns
- so use
this with care.

> How can I avoid this kind of hanging problems.
> How can I diagnose to see where it is failing?

As I don't know DBI/DBD, I can't help you with that part. Of
course,
if you had used Win32::SqlServer, you would have gotten the
line
number in the error message. 
--
Erland Sommarskog, Stockholm, esquelsommarskog.se



_______________________________________________
Perl-Win32-Database mailing list
Perl-Win32-Databaselistserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )