If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Cataloging DB Names for ODBC use?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-03, 15:03
Grindel Grindel is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
Cataloging DB Names for ODBC use?

Hi All

I'm running Solaris 8 and have a DB2 app developer's kit installed. I'm connecting to a DB2 db also on Solaris. From the command line, I can issue the command:

db2 connect to DB2DSN user netgty

and it actually goes out to the database, prompts for a password, and connects. Cool!

Now that I know that part is working, I get to what I REALLY want to do - connect to that database using ODBC. I've downloaded DBI and DBD::ODBC and am moving along until I get to the "make test" part of DBD::ODBC. I use "DB2DSN" as my "DBI_DSN" variable, and try to do the test, but I see no traffic generated at all towards my DB server. I've been strggling with this for a day or two, and can't but figure that there's something wrong with my environment, but I don't know what. "DB2DSN" works from the command line, but nowhere else.

Anyone have any suggestions???

TIA
Rick
Reply With Quote
  #2 (permalink)  
Old 12-22-03, 17:11
GertK GertK is offline
Registered User
 
Join Date: Nov 2003
Location: Netherlands
Posts: 96
Re: Cataloging DB Names for ODBC use?

Quote:
Originally posted by Grindel
Hi All

I'm running Solaris 8 and have a DB2 app developer's kit installed. I'm connecting to a DB2 db also on Solaris. From the command line, I can issue the command:

db2 connect to DB2DSN user netgty

and it actually goes out to the database, prompts for a password, and connects. Cool!

Hi

From the command line issue the command

db2 catalog system odbc data source db2dsn

and it should work.

regards, Gert
Reply With Quote
  #3 (permalink)  
Old 12-22-03, 17:22
Grindel Grindel is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks for the tip, Gert. Unfortunately, I get an error:

SQL1297N This command is currently not supported on this platform

Looks like I'm S.O.L. on this one.

Tanks again
Rick
Reply With Quote
  #4 (permalink)  
Old 12-23-03, 01:26
GertK GertK is offline
Registered User
 
Join Date: Nov 2003
Location: Netherlands
Posts: 96
Quote:
Originally posted by Grindel
Thanks for the tip, Gert. Unfortunately, I get an error:

SQL1297N This command is currently not supported on this platform

Looks like I'm S.O.L. on this one.

Tanks again
Rick
Sorry, I could have expected it.

I'm not familiar with it, but you can connect to DB2 directly from Perl with the DBD :: DB2 interface. Maybe that's an option?

Hope this helps.

regards, Gert
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On