Title: RE: Win32::OLE question

It's easier if you setup an ODBC connection( say "MYFOXDB") using the FoxPro driver( with Control Panel->ODBC).
Then you can simply connect like below.

my $Conn = Win32::OLE->new("ADODB.Connection");
my $RS   = Win32::OLE->new("ADODB.Recordset");

$ConnectionString = "DSN=MYFOXDB;UID=;PWD=;"

$Conn->Open($ConnectionString);

Regards
Siva

-----Original Message-----
From: Fernando Freire Baez [Medicare)
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 3:27 PM
To: '[EMAIL PROTECTED]'
Subject: Win32::OLE question


I have a Foxpro file table that I want to access using win32::OLE. I use the
module to connect my script to an access database. I want to know the what I
have to write in the connection string. I use this code to connect to the
Access database:

my $Conn = Win32::OLE->new("ADODB.Connection");
my $RS   = Win32::OLE->new("ADODB.Recordset");

my $DSN = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};
        DBQ=$database;UID=;PWD=;";
          
$Conn->Open($DSN);

I want to know how to configure the connection string(the provider and the
driver for a foxpro table). Thanks.

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

Reply via email to