in reply to DBI Module Question
Hey Guys, Thank you all for taking time to solve my issue. All of you have been really helpful. i tried connecting to the db using a diff driver and got the expected result. even though i am puzzled as to why DBI doesnt work. i am happy that Win32::ODBC works. here is the code.
use Win32::ODBC; $connection = new Win32::ODBC("SQL SERVER") or die "Could not open co +nnection to DSN because of [$!]"; $SQL = "select * from pubs.dbo.authors where au_lname = 'green'"; $connection->Sql($SQL); while($connection->fetchrow()) { @datarow = $connection->Data(); print "@datarow\n"; } $connection->Close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI Module Question
by runrig (Abbot) on Sep 30, 2009 at 16:10 UTC |