Connecting Perl and SQL 
Author Message
 Connecting Perl and SQL
Has anyone had success connecting Perl for Windows NT and MS SQL Server
6.5?  I am not having much success installing the SQL modules under CPAN
on the Perl web site.  I would appreciate any advice someone could give
on how they were able to install the modules and make a connection.
Thanks.
--
Christy Nunnally
(972) 462-5433



Sat, 07 Jul 2001 03:00:00 GMT
 Connecting Perl and SQL

I've had no problem "connecting" (and doing most queries I need to) using
ActiveState's Perl along with both Win32::OLE and ODBC methods (both covered
in the Win32 Resource Kit and a couple of Perl Journals this past year).

Dan

Quote:

>Has anyone had success connecting Perl for Windows NT and MS SQL Server
>6.5?  I am not having much success installing the SQL modules under CPAN
>on the Perl web site.  I would appreciate any advice someone could give
>on how they were able to install the modules and make a connection.
>Thanks.
>--
>Christy Nunnally
>(972) 462-5433




Wed, 11 Jul 2001 03:00:00 GMT
 Connecting Perl and SQL

Quote:
>Has anyone had success connecting Perl for Windows NT and MS SQL Server
>6.5?  I am not having much success installing the SQL modules under CPAN
>on the Perl web site.  I would appreciate any advice someone could give
>on how they were able to install the modules and make a connection.

There are several ways to access MS SQL Server from Perl:

* Win32::ODBC.
* DBI::ODBC
* ADO using Win32::OLE
* MSSQL::DBlib and MSSQL::Sqllib.

Which you choose depends on what you requirements are. If you want to
be portable between various engines, and also OS:s, you should probably
pick DBI::ODBC, as DBI is a standard database interface for Perl, and
there are drivers available for many DB engines.

On the other hand, if you know that you will stay on NT, but still
work with some other engines, for instances Access, ADO may be a
good choice. I don't know exactly what ADO supports, but I'd sur-
prised if you can't talk to Oracle that way. I haven't looked that
much on ADO, but it seems more easy to use than ODBC.

If you know that you will only use MS SQL Server, then you could
consider the MSSQL::* modules. They are not very portable, then
again MSSQL::Sqllib might supply the best interface in town. Then
again, I'm biased, because I'm the author of those modules. Pity,
though that MS didn't upgrade DB-Library for SQL Server 7.

Anyway, you find my modules at http://www.algonet.se/~sommar/mssql.
A new version that supports the newer Perl versions should be out
soon.

As for Win32::ODBC it appears to be widely used, but there appears
to have be no development in recent years. I've seen too many
beginner's questions about it to recommend it.

--

This could have been my two cents worth, but alas the Swedish
government has decided that I am not to have any cents.



Wed, 11 Jul 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Connecting Perl to SQL database

2. Connecting Perl to SQL Server with Named Pipes?

3. connecting to sql server 2000 via perl from unix

4. Using PERL to connect to SQL 2000

5. Perl for Linux connecting to SQL Server 6.5

6. Connecting to SQL with Perl on Apache

7. Connecting to SQL Server from Unix & Perl

8. Connect to MS SQL 6.5 from Linux with Perl 5

9. Connecting to SQL Server from Unix, Perl

10. Connect to MS SQL 6.5 from Linux with Perl

11. UNIX/PERL Connect to MS SQL

12. Connecting to MSSQL from UNIX (perl, C)?


 
Powered by phpBB® Forum Software