Link to home
Start Free TrialLog in
Avatar of phrea84
phrea84

asked on

sql for perl?

hi all

im a noob to perl and needed some info.  we are running an internal troubleticket system.  it was running fine on mysql.  we just moved it over to sql and are having some issues.  it is dependent on perl.

my question is:  when we put it on mysql we had issues until we installed the mysql componet in perl.   is there a componet i need for sql?  my problem is is that i can see the data in sql, but cant edit it via the troubleticket software.

thanks
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phrea84
phrea84

ASKER

like i said, im a noob and really need help.  the last guy that helped me gave me command to get the mysql installed and running.  i just ran an update to perl and installed the odbc drvier for dbi.  is this what i need?  if not, please assist.

thanks
Avatar of phrea84

ASKER

when i try to claim ownership, i get a page cannot be displayed.  when i try to delete the page just refreshes.

im 90% sure this is due to either sql permissions or the perl not being configured properly for sql.

perl was set up for mysql.

thanks
See my original comment.  You need to install the appropriate DBD (Database Driver) for the database you are connecting to.  You will also need to change the connection string in the Perl script.
Perl itself doesn't handle the database interface.  Almost always, a perl program will use the DBI module, which will use whatever module is needed for your specific database.  If you were using mysql before, you needed DBD::mysql.  If you are using microsoft sql, you need the DBD::odbc.  You need to install this as Tintin suggested.  You can install it with: if you are on windows using ActiveState, use this.  Otherwise, what OS?
    ppm install DBD-ODBC

Other than that, there are some SQL commands that mysql supports but microsoft sql does not.  If your application is using any of these, those parts will have to be re-written using microsoft compatible commands.
Avatar of phrea84

ASKER

can you tell me what this error means?

*** 'C:\Inetpub\Intranet\ttx224\ttx.cgi' error message at: 2008/03/10 13:45:22
DBD::ODBC::db do failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to bigint. (SQL-42000)(DBD: Execute immediate failed err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 238.
DBD::ODBC::db do failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to bigint. (SQL-42000)(DBD: Execute immediate failed err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 244.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.

*** 'C:\Inetpub\Intranet\ttx224\ttx.cgi' error message at: 2008/03/10 14:52:50
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.
DBD::ODBC::st fetchrow_array failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-01004) at C:/Inetpub/Intranet/ttx224/TTXMSSQLTickets.pm line 270.

i believe if i can fix this than my issue will be resolved.

any help is appreciated.

thanks!
Avatar of phrea84

ASKER

hey adam

this is on a windows 2003 box.  i typed the command you posted, but got a "no missing componets" message.

there is a plug-in the author created for sql.  i have emailed him, but havent heard anything back yet.

thanks
Let's get a couple of things straight.

1.  You are running ActivePerl?
2.  You installed the DBD::ODBC driver with ppm?
3.  You updated the Perl script to change the connection strings?
Avatar of phrea84

ASKER

sorry for my lack of smarts on this matter.

im running activeperl on a server 2003 box.  i installed the dbd::odbc driver.  im not sure if i updated the perl script to change the connection settings.  how would i find out?  i did change the systm dn to point to the sql server instead of the mysql server if this is what you mean.

thanks alot for the help guys. :)
This error:
    Error converting data type varchar to bigint
means that the database expects one type, but you are asking for another type.  A varchar is a character string of variable length (max length is either 255 or 65535).  Bigint is a 64 bit integer (whole number).  

This error:
    String data, right truncation
There is a field with data longer than the longest max allowed.  What to do about this:
1) Set LongTruncOk to true.  The truncation will still happen, but you won't get a warning about it.
2) Set LongReadLen to the size you need.
Avatar of phrea84

ASKER

sorry.  i give up.  this is kinda over my head and i cant have the tt system down any longer.  thanks for the help.  when i get more free time, ill make a backup and try again on a test server.
Was there a reason for converting from mysql to microsoft?
You might want to post a question in the database areas asking for tips on how to convert.