RE: :ODBC configuration of DSN within program.

2001-07-29 Thread Hugh J. Hitchcock
right, but... not to be difficult or anything, but that's not really a dsn... it is a connection string. A dsn is an ODBC data source name (on windows) which is configured through the control panel. But yes, this would be the solution to the question. (btw you could probably use a single quote in

RE: :ODBC configuration of DSN within program.

2001-07-29 Thread Michael Blackmore
Dear All, This code snippet shows the solution: The only trick is that you need to double escape the directories if you specify them in a string. ... my $dbfile = "v:mdbsperlmdb.mdb"; my $dsn = "driver=Microsoft Access Driver (*.mdb);dbq=$dbfile"; my $dbh = DBI->connect("dbi:ODBC:$dsn")

RE: :ODBC configuration of DSN within program.

2001-07-29 Thread Hugh J. Hitchcock
the way I understand it, the whole point in having a DSN is to have a permanent definition of a database connection so that it does not have to be programmatically created. I don't believe that, in Perl, anyway, there is a way to actually change the attributes of a DSN. (I'm assuming you are talki

RE: :ODBC configuration of DSN within program.

2001-07-29 Thread Neil Lunn
Then use a dsnless connection. Look at perldoc DBD::ODBC for the examples (connecting to Access) that are already listed. --Neil >-Original Message- >From: Michael Blackmore [mailto:[EMAIL PROTECTED]] >Sent: Monday, July 30, 2001 10:51 AM >To: [EMAIL PROTECTED] >Subject: DBI::ODBC config