Hi,
i have two password protected access database
1- oda.mdb ;password:np
tables
eczane : this table include pharmacist's infos
fields :
ID
Name
Address
Tel etc.....
2-Makbuz.mdb ;password:np
table
invoice : this table include invoices data
fields:
PharmacistID
invoiceNo
TotalValue
i want to list invoices data and pharmacist's infos with datagrid but i have
a problem.
Because this mdb files password protected and when i want querying this
database's tables with ado i'm getting this error message:
"runtime error -2147467259(80004005)
not a valid password"
can i connect two password protected access database with ado connection and
recordset objet?
or is there another way?
Note: this database protected microsoft jet password. no user id and
password, only database password.
this code running before databases are not password protected. when i assign
a password this mdb files this code give a error message.
With Cnn
If .State = 1 Then .Close
.CursorLocation = adUseServer
.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source="
"c:\data\makbuz.mdb;Jet
OLEDB:Database Password=np"
.Open
End With
With Cmd
.CommandType = adCmdText
.CommandText = "select top 50 invoiceno as [Invoice
No],invoicedate as [Invoice Date],PharmacistID as
[Pharmacist ID],Pharmcyname as [Pharmacy
Name],PharmacistName as [Pharmacist Name],TotalValue
as Tutar from invoice,c:\data\oda.eczane where
ID=PharmacistID and invoicedate>=#01/01/2002# order
by invoiceno desc"
Set .ActiveConnection = Cnn
End With
With Rst
.CursorLocation = adUseServer
.LockType = adLockPessimistic
.CursorType = adOpenDynamic
.Open Cmd 'this line generate an error message.
End With
thank you...