I commented out next code and filled the right info
but after executing the script extdata.pl I got error# DatabaseDSN => 'DBI:odbc:database=123;host=localhost;',
# DatabaseUser => 'user',
# DatabasePw => 'somepass',
# Type => 'mysql',
Code: Select all
install_driver(odbc) failed: Can't locate DBD/odbc.pm
Code: Select all
DBI connect('database=regkarpc;host=localhost;','regkar',...) failed: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002) at /opt/otrs/bin/cgi-bin/../../Kernel/System/DB.pm line 256
ERROR: ExtData-10 Perl: 5.10.1 OS: linux Time: Wed Mar 6 09:40:26 2013
http://wiki.sysconfig.org.uk/display/ho ... CentOS+5.2
Now the command
#isql mydsn
gives me some output from the database (mydns is the name in odbc,ini), but if I execute extdata.pl, I got the same error as above - DBI connect('database=regkarpc;host=localhost;','regkar',...) failed:
I don't know if the installation and configuration of odbc drivers were necessary or how to tell the script extdata.pl that it has to use the source mysdn or how to connect to my database some other way.
Or is it necessary for the table from which I want to extract my data to be in the otrs database?
To answer this question I copyed my table regkar_pc into the otrs database.
I commented the lines which originaly had been commented in your script
and run extdata.pl# DatabaseDSN => 'DBI:odbc:database=123;host=localhost;',
# DatabaseUser => 'user',
# DatabasePw => 'somepass',
# Type => 'mysql',
I got an error
Code: Select all
DBD::mysql::st execute failed: called with 1 bind variables when 0 are needed at /opt/otrs/bin/cgi-bin/../../Kernel/System/DB.pm line 618.
ERROR: ExtData-10 Perl: 5.10.1 OS: linux Time: Wed Mar 6 10:38:37 2013
Message: called with 1 bind variables when 0 are needed, SQL: 'SELECT ID,NAZEV FROM regkar_pc LIMIT 10'
Traceback (6611):
Module: ./extdata.pl (unknown version) Line: 43
DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/otrs/bin/cgi-bin/../../Kernel/System/DB.pm line 685.
Can you help me, please?