Perl CGI script using Win::ODBC module - failed login on
byoukstetter_at_hotmail.com
Date: 12/27/04
- Next message: GRLCOPM: "Re: Help needed for perl rookie"
- Previous message: ioneabu_at_yahoo.com: "Re: regexp match large file"
- Next in thread: Matt Garrish: "Re: [OT] Perl CGI script using Win::ODBC module - failed login on"
- Reply: Matt Garrish: "Re: [OT] Perl CGI script using Win::ODBC module - failed login on"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Dec 2004 14:28:42 -0800
Ok I have an issue with a CGI script that I have written in Perl using
the Win::ODBC module for db access. I have a System DSN that I have
setup on the server and I want the script to use that ODBC DSN for
security reasons. The bit something like:
$DSN = "vrs";
if (!($db = new Win32::ODBC($DSN))){
print "Content-type: text/html\n\n";
print "Error connecting to $DSN\n";
print "Error: " . Win32::ODBC::Error() . "\n";
exit;
}
.
.
.
>>From all the examples I've seen, this work. However, when the script
is run I always get an error like: "the user '(null)' is not
associated with a trusted SQL server connection".
If I change the script to:
$DSN = "vrs";
if (!($db = new Win32::ODBC("dsn=vrs; uid=xx; pwd=blah;"))){
print "Content-type: text/html\n\n";
print "Error connecting to $DSN\n";
print "Error: " . Win32::ODBC::Error() . "\n";
exit;
}
The new Win32::ODBC object is created with out a problem, but I want to
encapsulate the login credentials into the DSN.
I am using IIS (v 6.0 and 5.1). At first I thought this was a system
resource access issue with the user account that IIS uses for this web
site, but after giving this user full access, Im still at a loss. Can
anyone shed some light on my delema? Thanks in advance.
Brandon
- Next message: GRLCOPM: "Re: Help needed for perl rookie"
- Previous message: ioneabu_at_yahoo.com: "Re: regexp match large file"
- Next in thread: Matt Garrish: "Re: [OT] Perl CGI script using Win::ODBC module - failed login on"
- Reply: Matt Garrish: "Re: [OT] Perl CGI script using Win::ODBC module - failed login on"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|