If you are connecting from a Win32 machine to a database you can 
configure your ODBC databases through the control panel.  Lets say you 
called the database 'example'.  You can now connect to the database using:

my $dbh = DBI->connect('dbi:ODBC:example',$user,$passwd);

Of course, you will have to install the DBD::ODBC module first.  If you 
are using activestate, thats just 'ppm install DBD-ODBC'.

If, on the other hand, you are trying to connect from a Linux box I 
suggest finding a new database.  There is no good way to connect from 
Linux to MS-SQL server.  There are proprietary drivers you can buy but 
they're not easy to set up.  You can configure a proxy database as 
described in O'Reilly's "Programming the Perl DBI" but its slow and you 
will need to compile a multi-threaded perl to have more than one 
connection to the proxy at a time.  Our solution to that problem was 
using MySQL.

Good Luck!

- Johnathan


louie miranda wrote:

>$dbh = DBI->connect("dbi:mysql:world", 
>"username", "mypassword",
>{ RaiseError => 1 } );
>
>
>Hi, does connecting perl to a windows db differ from what?
>like mysql it will connect using that example on top, sample only. k?
>
>
>thanks,
>louie...
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to