PDA

Click to See Complete Forum and Search --> : Newbie : Openning a MS Access Database


omarswan
Nov 18th, 1999, 03:50 AM
Could some one please give me the parameters for the following.

(1)OpenDatabase
(2)OpenRecordset

I whould like to know how to open a database exclusive or shared. If you could also explain the purpose and ue of :
(1)dbOpenTable
(2)dbOpenDynamic
(3)dbOpenDynaset
(4)dbOpenSnapshot
etc.

any help or example would be gladely appreciated.

Thanks,
Omar

[This message has been edited by omarswan (edited 11-18-1999).]

Aaron Young
Nov 18th, 1999, 02:00 PM
To Open a Database and Recordset..

Dim oDB As Database
Dim oRS As Recordset
'Open the DB Exclusively
'Use False to Open as Shared
Set oDB = Workspaces(0).OpenDatabase("Biblio.mdb", True)
Set oRS = oDB.OpenRecordset("SELECT * FROM Authors", dbOpenForwardOnly)
While Not oRS.EOF
List1.AddItem oRS("Name")
oRS.MoveNext
Wend
Set oRS = Nothing
oDB.Close
Set oDB = Nothing

dbTable - Opens a Standard Table, giving Access to its Fields.
dbDynaset - Opens a Linked Table or SQL SELECT, Which can Contain Multiple Field from Multiple Tables and is Fully Editable.
dbDynamic - ODBC Cursor, Pretty much the same as dbDynaset, except Membership isn't Fixed.
dbSnapShot - Is a Static Resultset, the Values are Fixed.
dbForwardOnly - Is the Fastest as it retrieves a ReadOnly, Single Pass Resultset. (Non-Editable).

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net