I'm having trouble opening a database with a password using 
PearlScr.bADO/OLE-DB/ASP.  I am using an MS Access database.  I can open 
and use a database just fine that does not have a password, but my problem 
must be with the syntax of the connection string with a password.  I am 
using basically the same form that I have used successfully with VBScript.

Here's the database opening code snippet:

   # Create the database connection
   my $SQL = "SELECT * FROM tblone";
   my $objConn = $Server->CreateObject("ADODB.Connection");

   # Define the connection string
   my $prov = "Provider=Microsoft.Jet.OLEDB.4.0; ";
   my $dsourc = "Data Source=C:\\inetPub\\wwwroot\\dbfolder\\database.mdb; ";
   my $dbprog = "Jet OLEDB:Database; ";
   my $pw = "Password=password4;";
   my $dbopen = $prov . $dsourc . $dbprog . $pw;

   #Open the database connection
   $objConn->Open($dbopen);

   # Create a Recordset
   my $rsbotsites = $objConn->Execute($SQL);
   $rsbotsites->movefirst;      

At this point ASP complains that there are no records to open.  There 
should be!  If I remove the password from the database and the $pw 
references above,  it works fine and I can see all the records.

Any suggestions about how to use passwords, or do passwords not work with 
PerlScript and ADO?

Thanks for any help.
Dick Marcum
[EMAIL PROTECTED]

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

Reply via email to