Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
First perl/ODBC connection
Message
De
09/08/2001 20:07:51
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
First perl/ODBC connection
Divers
Thread ID:
00542084
Message ID:
00542084
Vues:
59
I am trying to figure out how to connect to MSSQL server 7.0 database using perl/odbc thus far I have set up odbc connection that tests successfully but when connecting via perl script i get error message.

The Code used:
#!/perl/bin/perl

&print_header;
&connect_db;
sub print_header{
print "Content-type: text/html\n\n";
}
sub connect_db{
$DSN="GameServer";
use Win32::ODBC;
if (!($db=new Win32::ODBC($DSN ))) {
print "
Error connecting to $DSN\n";
print "Error: " . Win32::ODBC::Error() . "\n";
}
else {
print "Connection Successful";
}
}

The ERROR Msg:

Error connecting to GameServer Error: [18452] [] "[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."

How do i use the 'sa' username and pass along in scripts to allow access to the database?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform