Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: linuxdata to MSSQL database

by hacker (Priest)
on Jul 24, 2002 at 12:00 UTC ( #184787=note: print w/replies, xml ) Need Help??

in reply to linuxdata to MSSQL database

Writing to text files is probably redundant. You should look into using the MSSQL::DBlib and MSSQL::Sqllib modules (see also pm nodes here on MSSQL), FreeTDS (see also pm nodes here on FreeTDS)and use the methods contained therein.

You could also use raw ODBC methods through DBI with something like:

use strict; use warnings; use DBI; my $dbuser = "foo"; my $dbpass = "bar"; my $dbname = "blort"; my $dbhost = "localhost"; my $dsn = "DBI:ODBC:database=$dbname;host=string"; my $dbh = DBI->connect($dsn, $dbuser, $dbpass, $dbhost {RaiseError => 1}); # .. Execute your query on $dbh here, SELECT/INSERT/etc. $dbh->disconnect;

(I initially read this and thought MySQL, and had included a good example snippet of code you could use, but then re-read it as MSSQL when I previewed it. I've never used MSSQL, so I updated my reply to be more helpful in this environment.)

Replies are listed 'Best First'.
Re: Re: linuxdata to MSSQL database
by peppiv (Curate) on Jul 24, 2002 at 12:26 UTC
    I just did this at our company. I used FreeTDS, DBI, and DBD::Sybase. Went rather smoothly. Didn't have to pay for any extra ODBC bridge stuff and made my boss happy:)

    What version of MSSQL are you going to use? I'm only using 7.0 and I know the Sybase module works well up to this point. But I'm not sure about MSSQL 2000.

    Also, if you decide to try FreeTDS you'll have to go through and get on the mailing list. It is very helpful.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://184787]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-06-20 06:58 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.