> -----Original Message-----
> Behalf Of Morse, Richard E.
>
> Hi!  I've written a program that extracts data from a source database
> (Oracle), and currently uses ODBC to write the data out to an Access
> database.  However, the problem is that this requires me to have already
> created the DSN by hand.  Is there some way to automate creating a DSN, so
> that I could have the script create different file names depending on the
> data that it is extracting, also including the date?  I also don't want to
> have to manually create the empty database file (via the "create"
> button in
> the ODBC DSN config panel), but rather have that done automatically.
>
> I guess what I'm looking for is the proper code to use instead of this
> (which doesn't work!):
>
> use DBI;
>
> my $dbh = DBI->connect("dbi:ODBC:driver=Microsoft Access
> Driver(*.mdb);dsq=\\\\mycomputer\\\c\$\\my_db_file.mdb", '', '') or die
> ("This really doesn't work!");
>
> Thanks for any help or pointers you can give!
>

In the past the answer to this question has always been that you can't
create a MS Access Database.

Best way is to make a dummy database file with nothing in it.  Each time you
want a new one, copy it with a new name.

Once you have it you should be able to use a DNS-less connection string to
connect to it.

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to