Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

perl dbi driver for microsoft sql?

2 views
Skip to first unread message

gavino

unread,
Aug 15, 2006, 2:00:40 PM8/15/06
to
where do i find dbi driver for micrsoft sql?

Paul Lalli

unread,
Aug 15, 2006, 3:23:16 PM8/15/06
to
gavino wrote:
> where do i find dbi driver for micrsoft sql?

The same place you find all Perl Modules - http://search.cpan.org

Is
http://search.cpan.org/~jwied/Msql-Mysql-modules-1.2219/mysql/lib/DBD/mysql.pm
what you're looking for?

Paul Lalli

Sherm Pendley

unread,
Aug 15, 2006, 4:15:18 PM8/15/06
to
"Paul Lalli" <mri...@gmail.com> writes:

> gavino wrote:
>> where do i find dbi driver for micrsoft sql?
>
> The same place you find all Perl Modules - http://search.cpan.org

Quite right.

Actually, no. mSQL is not Microsoft SQL Server, it's a different product:

<http://www.hughes.com.au/products/msql/>

I couldn't find a MS-SQL specific DBD module - I think most people use
DBD::ODBC.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Paul Lalli

unread,
Aug 15, 2006, 4:21:42 PM8/15/06
to
Sherm Pendley wrote:
> "Paul Lalli" <mri...@gmail.com> writes:
>
> > gavino wrote:
> >> where do i find dbi driver for micrsoft sql?

>


> > Is
> > http://search.cpan.org/~jwied/Msql-Mysql-modules-1.2219/mysql/lib/DBD/mysql.pm
> > what you're looking for?
>
> Actually, no. mSQL is not Microsoft SQL Server, it's a different product:
>
> <http://www.hughes.com.au/products/msql/>

Whoops. Sorry about that. Thanks for the catch, Sherm.

Paul Lalli

MarkRat

unread,
Aug 15, 2006, 4:41:19 PM8/15/06
to

Sherm Pendley wrote:
> "Paul Lalli" <mri...@gmail.com> writes:
>
> > gavino wrote:
> >> where do i find dbi driver for micrsoft sql?
> >
> > The same place you find all Perl Modules - http://search.cpan.org
>
> Quite right.
>
> > Is
> > http://search.cpan.org/~jwied/Msql-Mysql-modules-1.2219/mysql/lib/DBD/mysql.pm
> > what you're looking for?
>
> Actually, no. mSQL is not Microsoft SQL Server, it's a different product:
>
> <http://www.hughes.com.au/products/msql/>
>
> I couldn't find a MS-SQL specific DBD module - I think most people use
> DBD::ODBC.
>

You can also use DBD::ADO or DBD::Sybase to connect to MS SQL databases.

Ben Morrow

unread,
Aug 15, 2006, 7:30:37 PM8/15/06
to

Quoth Sherm Pendley <sh...@Sherm-Pendleys-Computer.local>:

> "Paul Lalli" <mri...@gmail.com> writes:
>
> > gavino wrote:
> >> where do i find dbi driver for micrsoft sql?
> >
> > The same place you find all Perl Modules - http://search.cpan.org
>
> Quite right.
>
> > Is
> > http://search.cpan.org/~jwied/Msql-Mysql-modules-1.2219/mysql/lib/DBD/mysql.pm
> > what you're looking for?
>
> Actually, no. mSQL is not Microsoft SQL Server, it's a different product:
>
> <http://www.hughes.com.au/products/msql/>
>
> I couldn't find a MS-SQL specific DBD module - I think most people use
> DBD::ODBC.

I've had success in the past using DBD::Sybase (it took me a long time
to figure that one out). AFAIK, this is the only way to connect to MSSQL
from a non-MS machine (which I needed to do at the time).

Ben

--
You poor take courage, you rich take care:
The Earth was made a common treasury for everyone to share
All things in common, all people one. [benm...@tiscali.co.uk]
'We come in peace'---the order came to cut them down.

Sherm Pendley

unread,
Aug 15, 2006, 10:25:08 PM8/15/06
to
Ben Morrow <benm...@tiscali.co.uk> writes:

> Quoth Sherm Pendley <sh...@Sherm-Pendleys-Computer.local>:


>>
>> I couldn't find a MS-SQL specific DBD module - I think most people use
>> DBD::ODBC.
>
> I've had success in the past using DBD::Sybase

I hesitated to mention it, because a quick glance at the docs mentioned only
a few specific versions of MS-SQL, and was in general not very confidence-
inspiring. I'll keep it in mind in the future.

> (it took me a long time to figure that one out)

Yeah, it's not very obvious unless you know the history. As I understand it,
MS-SQL is more or less a fork of Sybase, so that the network protocol is more
or less the same.

> AFAIK, this is the only way to connect to MSSQL
> from a non-MS machine (which I needed to do at the time).

Another approach would be to set up a DBD::Proxy server on the Windows box
that's running MS-SQL, and connect to that from just about anything. I've
gotten good results with that approach in the past - although I was writing
for "classic" MacPerl clients connecting to a MySQL server on Solaris.

Brian Helterline

unread,
Aug 17, 2006, 7:15:04 PM8/17/06
to
gavino wrote:
> where do i find dbi driver for micrsoft sql?
>
You need the ODBC driver to connect to MS SQL

http://search.cpan.org/search?query=ODBC&mode=all

-brian

John Bokma

unread,
Aug 17, 2006, 7:29:46 PM8/17/06
to
"gavino" <boot...@yahoo.com> wrote:

> where do i find dbi driver for micrsoft sql?

http://www.google.com/search?q=site:johnbokma.com+odbc

If you're going to use LWP::UserAgent as well, read the second link in
that result.

--
John Experienced Perl programmer: http://castleamber.com/

Perl help, tutorials, and examples: http://johnbokma.com/perl/

gavino

unread,
Aug 17, 2006, 8:49:38 PM8/17/06
to

Sherm Pendley wrote:
> "Paul Lalli" <mri...@gmail.com> writes:
>
> > gavino wrote:
> >> where do i find dbi driver for micrsoft sql?
> >
> > The same place you find all Perl Modules - http://search.cpan.org
>
> Quite right.
>
> > Is
> > http://search.cpan.org/~jwied/Msql-Mysql-modules-1.2219/mysql/lib/DBD/mysql.pm
> > what you're looking for?
>
> Actually, no. mSQL is not Microsoft SQL Server, it's a different product:
>
> <http://www.hughes.com.au/products/msql/>
>
> I couldn't find a MS-SQL specific DBD module - I think most people use
> DBD::ODBC.
>
> sherm--

how id DBD::ODBC set up?
I was trying sybase and freeTDS and have headache

gavino

unread,
Aug 17, 2006, 8:50:58 PM8/17/06
to

HOW?

Sherm Pendley

unread,
Aug 17, 2006, 10:12:09 PM8/17/06
to
"gavino" <boot...@yahoo.com> writes:

What have you tried? What was the result? Is there some part of the
documentation you're having trouble with?

Jim Gibson

unread,
Aug 21, 2006, 3:51:59 PM8/21/06
to
In article <1155862258.1...@h48g2000cwc.googlegroups.com>,
gavino <boot...@yahoo.com> wrote:

> Sherm Pendley wrote:
> > "Paul Lalli" <mri...@gmail.com> writes:
> >
> > > gavino wrote:
> > >> where do i find dbi driver for micrsoft sql?
> > >
> > > The same place you find all Perl Modules - http://search.cpan.org
> >
> > Quite right.
> >
> > > Is
> > >
> > > http://search.cpan.org/~jwied/Msql-Mysql-modules-1.2219/mysql/lib/DBD/mysq
> > > l.pm
> > > what you're looking for?
> >
> > Actually, no. mSQL is not Microsoft SQL Server, it's a different product:
> >
> > <http://www.hughes.com.au/products/msql/>
> >
> > I couldn't find a MS-SQL specific DBD module - I think most people use
> > DBD::ODBC.
>

> HOW?

By first creating a workable ODBC client environment on your system and
then installing the DBD::ODBC module. Then you can use the facilities
of the DBI module to access your database through the ODBC layer.

See the FAQ at http://search.cpan.org/~jurl/DBD-ODBC-1.13/ODBC.pm

It doesn't look like an enitirely trivial process (I have not done it
myself), but you are more likely to get help here if you first make the
attempt to do it yourself, then post specific questions on the problems
you encounter.

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

John Bokma

unread,
Aug 21, 2006, 4:04:31 PM8/21/06
to
Jim Gibson <jgi...@mail.arc.nasa.gov> wrote:

> By first creating a workable ODBC client environment on your system
> and then installing the DBD::ODBC module. Then you can use the
> facilities of the DBI module to access your database through the ODBC
> layer.

Odd, I never did the client environment thingy. I installed the Desktop
edition (MSDE?) of MS SQL (the free version) and IIRC it worked out of the
box when I installed DBD::ODBC:


use DBI;

my $dbh = DBI->connect(

"dbi:ODBC:driver={SQL Server};"
. "Server=$ENV{ COMPUTERNAME };database=SomeDataBaseName;",
'',
'',
{
RaiseError => 1,
AutoCommit => 1
}
);

has been quite some time, but I can't recall any kind of magic required
:-)

0 new messages