Re: open a passwordsaved database ??
- From: Uwe Gutsche <uwe.gutsche@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 03 Mar 2006 11:14:55 +0100
Michael B. Johnson schrieb:
You would use it with ADO (Add a project reference to Microsoft Active-X DataHallo Michael and all others,
Objects 2.1 Library).
oConn would be an ADODB.Connection object.
I don't own a license to MS Access 2003, I still use MS Access '97. Inside of my
MS Access '97 database, I might create a module or place this sample inside the
code for a form. I don't need a password, because once I've opened MS Access,
I'm pretty sure that CurrentDb contains my connection to the database without
needing to supply the password again:
<air code>
Public Sub Sample()
Dim db As Database
Dim sSQL As String
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Table1", dbOpenTable)
Do Until rs.EOF
Debug.Print rs.Fields(0).Value
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub
</air code>
_______________________
Michael B. Johnson
I've tryed and it is like wrote yesterday, I need to open the database not the table.
The err.description is: "Objekt erforderlich" (object needed) err.number: 424 in the line:"Set db = CurrentDb"
My problem is to open the "CurrentDb".
It is not important, witch version the database is (the same result with access 2000)
I've tested a lot of variations (that gives me eg. the err.numbers: 3055 or 3421), but I doe'nt found the right.
Have anybody an idea??
And once more sorry, I have only the german description and my translation may be not right, thatswhy I give you also the err.number.
-------------------------------------------------
Uwe Gutsche
.
- Follow-Ups:
- Re: open a passwordsaved database ??
- From: Michael B . Johnson
- Re: open a passwordsaved database ??
- References:
- Re: open a passwordsaved database ??
- From: Uwe Gutsche
- Re: open a passwordsaved database ??
- From: Michael B . Johnson
- Re: open a passwordsaved database ??
- Prev by Date: Re: Using Access report in VB6. Possible?
- Next by Date: Re: open a passwordsaved database ??
- Previous by thread: Re: open a passwordsaved database ??
- Next by thread: Re: open a passwordsaved database ??
- Index(es):
Relevant Pages
|