It was just a mockup to demonstrate the error, usually I'd use die.
Anyway, it turns out the problem was with access permissions on SQL 7 
and IIS
so it's not a DBI issue except that the error message received was 
non-helpful,
but that's probably MS-SQL's problem.

Bart Lateur wrote:

>On Fri, 23 Nov 2001 14:17:08 -0800, Brent Cowgill wrote:
>
>>$dbh = 
>>DBI->connect('dbi:ODBC:database=test_dblayer;server=brent;driver=SQL 
>>Server', 'sqluser', '*') || print "cannot connect: $DBI::errstr\n";
>>print "failed for some mysterious reason" unless defined($dbh);
>>
>
>Likely not much of a hunch, but your logic is flawed. If the connect
>failed, you print out a message, and you assign the result of the
>print() (= 1) to $dbh! At least, use "or" instead of "||".
>

-- 
Regards,
Brent

interactivetools.com, inc.
Tel: (604)689-3347 - Fax: (604)689-3342 - Toll Free: 1(800)752-0455
Software for your Website - http://www.interactivetools.com/  



Reply via email to