in reply to Reviewing Rows from MSSQL SELECT statement

Not trying to deflect your question, but do you gain anything from using the MSSQL:SQLLib over say... DBI? DBI is database independant, so if you ever had to transition this code to another platform, the work would be minimal, compared to re-writing it from a platform specific module like you're using. I'm not trying to be a DBI zealot at all. DBI has just worked really well for me in MySQL,Oracle, and MSSQL.

<edit> Since I was babbling about it I thought I would expand on the fact that DBI is an interface, and you need the database driver DBD::ODBC to use it with DBI. Check the POD on them, and there are some good examples of how to get something up and running. </edit>


Grygonos

Replies are listed 'Best First'.
Re^2: Reviewing Rows from MSSQL SELECT statement
by dtharby (Acolyte) on Jun 09, 2005 at 07:31 UTC
    Since I posted this, I have started experimenting with DBI and have found that it would make sense to use this method.
    Once again, thanks to all Monks that replied..
    Danny
Re^2: Reviewing Rows from MSSQL SELECT statement
by dtharby (Acolyte) on Jun 09, 2005 at 07:50 UTC
    Grygonos,
    Do I have to specify use DBD::ODBC after the use DBI
    statement ?
    After reading various help pages on DBI/DBD, I thought
    that the DBI module loaded the appropriate DBD part on
    connect.
    Thanks
      No you don't.
      use DBI; my $dbh = DBI->connect('DBI:ODBC:driver=SQL Server;database=mydb;serve +r=myserver;app=myapp',$username,$password);