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; 
  4. my $url="JDBC:gfsql://cqserver=fiappl03itf:30305"; 
  5. my $hostname=""; 
  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 
  11. die "Couldn't connect to database: " . DBI->errstr; 
  13. $sth = $dbh->prepare("select cusip,source from TT_VIEW"); 
  14. $sth->execute(); 
  15. while ($row = $sth->fetch()) { 
  16. print $row; 
I am getting the below error.

Can't connect to data source jdbc:gfsql;;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 line 16
Mar 19 '08 #1
Share this Question
Share on Google+
1 Reply

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.