By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,852 Members | 1,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,852 IT Pros & Developers. It's quick & easy.

Error connecting to JDBC using perl

P: 1
I am using the following code and i get the below error
Expand|Select|Wrap|Line Numbers
  1. use DBI; 
  2. use DBD::JDBC; 
  3.  
  4. my $url="JDBC:gfsql://cqserver=fiappl03itf:30305"; 
  5. my $hostname="fiappl03itf.fmrco.com"; 
  6. my $port=30305; 
  7. my $dsn ='jdbc:gfsql'; 
  8. my 
  9. $dbh= DBI->connect("DBI::$dsn;hostname=$hostname;port=$port;url=$url;jdbc_character_set=ASCII") or 
  10.  
  11. die "Couldn't connect to database: " . DBI->errstr; 
  12.  
  13. $sth = $dbh->prepare("select cusip,source from TT_VIEW"); 
  14. $sth->execute(); 
  15. while ($row = $sth->fetch()) { 
  16. print $row; 
  17.  
I am getting the below error.

Can't connect to data source jdbc:gfsql;hostname=fiappl03itf.fmrco.com;port=303 05;url=JDBC:gfsql://cqserver=fiappl03itf:30305;jdbc_character_set=ASCI I, no database driver specified and DBI_DSN env var not set at jdbc_conn.pl line 16
Mar 19 '08 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
already replied to on other forum
Mar 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.