B
byoukstetter
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;
}
..
..
..
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
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;
}
..
..
..
is run I always get an error like: "the user '(null)' is notFrom all the examples I've seen, this work. However, when the script
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