Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy question for an easy answer. PERL/database

Status
Not open for further replies.

LinuXelite

Programmer
Jun 21, 2002
150
CA
Hi!!!

How r u?
This is my first time in this forum. I would like to know. I have to write a script that update a mySQL database from a ODBC connection. The ODBC driver is U/SQL.

what ODBC module do you sugest?
DBI/DBD/win32:ODBC (I prefer Linux)

Thank you
 
If you are using mysql and linux, why use ODBC? You can use DBI directly (with DBD-Mysql)

svar
 
I need to access a Cobol indexed file via U/SQL (Access cobol files though ODBC)

 
I can't be much help on the Windows platform - I'm on Red Hat Linux 7.3. Assuming you'll use ODBC, you'll need DBI and DBD::ODBC (I think - I've never used ODBC, but I'm pretty sure that's what the DBD driver is called) - you can find them at or search.cpan.org.

Once you've installed them, read the excellent perldocs for each by doing

perldoc DBI
perldoc DBD::ODBC

at a command prompt.

There is a DBD::mysql driver for MySQL - you can have one connection to your MySQL database open, and have another connection to the Cobol indexed files via DBD::ODBC open at the same time. I've only used DBD::mysql with MySQL, but I don't see why you shouldn't be able to access your MySQL database via ODBC - I just don't know how.

ThomVF pointed out the dbi-users mailing list - I've been a member of that list for years, and find the people on that list are *excellent* - including the people that wrote and maintain DBI and most/all of the DBD drivers. If you don't find your DBI/DBD answer here, you're sure to find it there.

HTH. Hardy Merrill
 
Ive already done that :)
Im a long time linux fans and linux user so compile a module or compiling an odbc driver is not hard for me. My problem is SCO unix. I dont have "make", the packaging system is weak.. I hate it. I know its a TRUE unix but I prefer my little linux.

Now I develop on win32 because its easier with WIN32::ODBC (the USQL driver is already installed).

I dont know where to start. USQL is a propriatery drivers availaible for openware unix and windows. We have few licences. It's not good. I can't test it on my linux box (that's why I use win32::ODBC, the drivers is already installed and i works).

Well, I'll use a native mySQL module and iodbc to access my datas. Wish me good luck. im confused.

I put "use strict" and now my program does not work. I declare my local vars with my $var; but what do I do for global vars?

$DSN = "AutonomieSante" unless (($DSN) = @ARGV);

Global symbol "$DSN" requires explicit package name at test.pl line 23.

Learning perl is exiting ;o)

 
LinuXelite

I would suggest you use the gnu development system, download from Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
What do u mean?

I use vim? What is the GNU development system?
 
Have a look at download the gnu compiler (gcc - which happens to be the same compiler you're familiar with from your linux experience)

I don't know if the gcc package comes with the make utility, but make is there on its own if you need it. Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
No it does not. Sco unix has a gcc compiler. "Make" is a package.

I can't install the binary and Im not going to compile it its not standar. all the path, libraries and headers are missing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top