kuvo
August 6th, 1999, 04:36 PM
Hi,
I want to connect to "MyDatabase.mdb", which has 3 tables: employees,
sales,and purchases. I've got to hardcode the name of the table "employees" to open the table.
Is there anyway to get how many tables are there in MyDatabase as well as
the names of all the tables ? Thanks
Set cnnData = New ADODB.Connection
Set cmdData = New ADODB.Command
Set rsData = New ADODB.Recordset
strCnn = "..."
cnnData.DefaultDatabase = "MyDatabase"
cnnData.ConnectionString = strCnn
cnnData.ConnectionTimeout = 30
cnnData.Open strCnn
rsData.CursorLocation = adUseServer
rsData.LockType = adLockReadOnly
rsData.Open "employees", cnnData, , , adCmdTable
I want to connect to "MyDatabase.mdb", which has 3 tables: employees,
sales,and purchases. I've got to hardcode the name of the table "employees" to open the table.
Is there anyway to get how many tables are there in MyDatabase as well as
the names of all the tables ? Thanks
Set cnnData = New ADODB.Connection
Set cmdData = New ADODB.Command
Set rsData = New ADODB.Recordset
strCnn = "..."
cnnData.DefaultDatabase = "MyDatabase"
cnnData.ConnectionString = strCnn
cnnData.ConnectionTimeout = 30
cnnData.Open strCnn
rsData.CursorLocation = adUseServer
rsData.LockType = adLockReadOnly
rsData.Open "employees", cnnData, , , adCmdTable