Article ID: 115713
Article Last Modified on 1/8/2003
Set DS = DB.CreateDynaset("Select * From <ownername>.<tablename>")
Set DS = DB.CreateDynaset("Select * From ,<tablename>")
Set DS = DB.CreateDynaset("<tablename>")
The database engine resolves this ambiguous reference by assuming you
are the owner, which is a reasonable assumption given that there are
no other owners. This works without error.
Set DS = DB.CreateDynaset("<ownername>.<tablename>")
The database engine's SQL parser is unable to resolve this reference.
It interprets <ownername> to be a database name, whether you specify
your ownername or someone else's. This results in error 3024:
Set DS = DB.CreateDynaset("<tablename>")
The database engine resolves this ambiguous reference alphabetically
by selecting the first owner of a table with the given table name. If
the other owner happens to be first alphabetically, then you receive
error 3078:
where <ownername> is the name of the other owner.
Set DS = DB.CreateDynaset("<ownername>.<tablename>")
The database engine's SQL parser is unable to resolve this reference.
It interprets <ownername> to be a database name. This results in
error 3024:
Set DS = DB.CreateDynaset("<ownername>.<tablename>", 64)
This passes the SQL statement directly to the ODBC backend processor,
bypassing the Microsoft Access database engine. The only drawback
to this method is that the resulting dynaset will note be updatable.
Dim DB as Database
Dim DS as Dynaset
Dim TD as New TableDef
Set DB = OpenDatabase("C:\VB\BIBLIO.MDB") ' Any temporary Microsoft
' Access database.
TD.Name = "<newtablename>" ' New table name in the Access database.
TD.SourceTableName = "<ownername>.<tablename>"
TD.Connect = "ODBC;" ' A longer string can be used.
DB.TableDefs.Append TD ' Append the Oracle table.
' Create a dynaset based on the attached table:
Set DS = DB.CreateDynaset("Select * from <newtablename>")
.
' Any operations you perform on the attached table are
' applied to the actual table in the Oracle database.
' But you cannot use the OpenTable Method on an attached table.
DB.TableDefs.Delete TD ' Remove the attached table when finished.
Instead of attaching and removing Oracle tables by using a temporary
Microsoft Access database, you can attach all the Oracle tables to a
permanent Microsoft Access database and reference that instead.Additional query words: 3.00
Keywords: kbprb KB115713