Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > perl as win32 and DSNless con to mdb?

Reply
Thread Tools

perl as win32 and DSNless con to mdb?

 
 
rob merritt
Guest
Posts: n/a
 
      08-01-2003
Hi here is wat I am trying:

use Win32::ODBC;


#my $dsn = "Provider=Microsoft.Jet.OLEDB.4.0;
dbq=h:/logs/mail/report/addressTrack.mdb";

my $dsn = 'driver=Microsoft Access
Driver(*.mdb);dbq=h:/logs/mail/report/addressTrack.mdb';


my $myDb = new Win32::ODBC($dsn);
#
if (!$myDb)
{
print "failed to conect to $DSN\n";
Win32::ODBC:umpError();
die;
}



what I get is:

H:\logs\mail\report>perl addresstrack.pl
failed to conect to

---------- Error Report: ----------
Errors for the package:
Connection Number:
Error number: 911
Error message: "[Microsoft][ODBC Driver Manager] Data source name not
found and
no default driver specified"
-----------------------------------
Died at addresstrack.pl line 26.


any ideas?
 
Reply With Quote
 
 
 
 
mgarrish
Guest
Posts: n/a
 
      08-02-2003

"rob merritt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi here is wat I am trying:
>
> use Win32::ODBC;
>
>
> #my $dsn = "Provider=Microsoft.Jet.OLEDB.4.0;
> dbq=h:/logs/mail/report/addressTrack.mdb";
>
> my $dsn = 'driver=Microsoft Access
> Driver(*.mdb);dbq=h:/logs/mail/report/addressTrack.mdb';

^^

Spaces are important! Change $dsn to:

my $dsn = 'driver=Microsoft Access Driver
(*.mdb);dbq=h:/logs/mail/report/addressTrack.mdb';

and it should connect.

Matt


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Piccolo con problema con il tipo float Matteo Mancini Ruby 3 10-08-2007 09:37 PM
Leer un texto con espacios en blanco con la clase Scanner (u otra) rosagog@gmail.com Java 4 08-14-2007 09:47 PM
¿Se puede ejecutar scripts con C# al igual que podía con VBScript? Liber ASP .Net 4 09-06-2004 08:34 PM
Microsoft Access DSNLess connection error, works fine in .ASP page, not in aspx code. Derrick ASP .Net 2 08-26-2004 07:12 PM
DSNLess troubles shank ASP General 4 07-17-2004 03:37 AM



Advertisments