hi
I am facing a problem while trying to connect toSQL Server Database
but my code does not even trigger a request to the database ( according to
log files)

My code is below,  What is the problem ?
Is it regarding to the code ?
Or to that of the settings made before the code is executed ( i.e copying
of the .pm & .pll files)

Thank you.

#!g:/perl/bin/perl

require "cgi-lib.pl";

use Win32::ODBC;

if(!($Db=new Win32::ODBC("dsn=mydsn;UID=sa;PWD= ")))
{
  print "Content-type: text/html\n\n";
  print "<html>";
  print "<head><title>DatabaseTest</title></head>";
  print "<body bgcolor=\"#FFFFFF\" text=\"#088000\">";

  print "<h2>Error Connecting to Database</h2>";
  print "<p>please try your request at a later Time</p>";

  print "</body></html>";
  exit;
}
else
{

  print "Content-type: text/html\n\n";
  print "<html>";
  print "<head><title>DatabaseTest</title></head>";
  print "<body bgcolor=\"#FFFFFF\" text=\"#088000\">";

  print "<h2>Successfully Connected to Database</h2>";

  print "</body></html>";
  exit;
}

This code on execution provides me with the result
Error Connecting to Database
please try your request at a later Time
which are printed out if the connection is not made.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to