Home: Perl Programming Help: DBI:
How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT



kraj123
Novice

Feb 22, 2008, 2:36 PM


Views: 10096
How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT

Hi Folks,

Please help me out with the following....

I want to connect MS SQL SERVER database from windows platform. I am confused with DBI and ODBC. I read in one of the forum to use DBD:ODCC which taks with DBI framework.

Can, anyone help me out like

1) which module to use in perl to connect MS SQL SERVER for windows environment.

2) What would be the syntax to connect MS sql server for that module....

Thanks...


eWish
User

Feb 23, 2008, 10:42 AM


Views: 10082
Re: [kraj123] How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT

You will need to use either DBD::ODBC or Win32::ODBC

The links I provided will show examples of how to connect using them.

--Kevin


kraj123
Novice

Feb 23, 2008, 2:25 PM


Views: 10075
Re: [eWish] How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT

Kevin,

Thanks for the reply.

According to you which is the best option to go with for windows with MS SQL SERVER combination.

DBD::ODBC or Win32::ODBC. ( I mean which is easy to code and maintain)

So, after downloading the module from CPAN , how to include in perl library.

Thanks...



kraj123
Novice

Feb 23, 2008, 3:32 PM


Views: 10072
Re: [kraj123] How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT

Kevin,

I just want to ask can we also use OSQL utility in this case. Is it easy thanthe other two Or it dosen't work.


eWish
User

Feb 24, 2008, 10:55 AM


Views: 10064
Re: [kraj123] How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT

I don't use MSSQL I use MySQL. So, I don't have the experience working with the DBD's for MSSQL. I would suggest you post a question on a forum like devshed.com or Thescripts in the database forums.


hydpm
User

Mar 12, 2008, 2:49 PM


Views: 10017
Re: [eWish] How to connect MS SQL SERVER WITH PERL FOR WINDOWS ENVIRONMENT

I feel, using DBI with the right DBD is better.

For the list avaialble drivers query using DBI's function, if not available for mssql the install that DBD.