|
-
Oct 14th, 1999, 05:44 AM
#1
Thread Starter
New Member
I keep getting this error when I run my code when I get to the Set ws line (or if this is ommited) the set mydb line.
the same code works if i set the dao properties to point to my database and an associate textbox contains data from the database !
ive tried reinstalling access and vb5
HELP !!
Private Sub FindTables()
Dim rs As Recordset
Dim Mydb As Database
Dim tbl As TableDef
Dim temp As String
Dim ws As Workspace
temp = Space(100)
temp = txtDatabase.Text
dataDatabase.DatabaseName = temp
Set ws = DBEngine.Workspaces(0)
Set Mydb = ws.OpenDatabase(temp)
For Each tbl In Mydb.TableDefs
lstTables.AddItem tbl.Name
Next tbl
End Sub
-
Oct 14th, 1999, 06:46 AM
#2
New Member
TonyJ,
In my experience this error occurred when the active x reference msado15.dll was missing or not pathed correctly. Check references, location and registry. mdac_type.dll puts it in program files\common files\system\ado I believe.
All the best
-
Oct 14th, 1999, 08:58 AM
#3
Guru
try running
regsvr32.exe "c:\program files\common files\microsoft shared\dao\dao350.dll"
to register the DAO library.
I ran your code and it was fine.....??
sorry
Tom
-
Oct 15th, 1999, 12:41 AM
#4
New Member
I'm running into the same issue except mine is a little more complex, maybe. I have no idea where in the code this is happening. I have an MDI form with a sheridan tool on it. When I replace this form with another nonMDI form, it works fine. This MDI form is linked to about 10 form files and 10 control files plus 6 DLL projects. It's a large project. I've also notice that when tweeking with the code I get the MSComctrlib object to disappear and tell me that it's a non defined user type.
Anyone have any kind of solution? This all started happening when I ran an installation of the project on my machine.
-
Oct 18th, 1999, 05:17 AM
#5
New Member
got the same error message myself using VB6 yesterday. I was trying to use RDO however, which I realised could only be used with the Enterprise edition. Your code does not indicate that you are using RDO but the run time error does occur under these circumstances.
-
Oct 18th, 1999, 05:46 AM
#6
Frenzied Member
In place of:
Set ws = DBEngine.Workspaces(0)
Set Mydb = ws.OpenDatabase(temp)
I'd usually use:
Set Mydb= Workspaces(0).OpenDatabase(temp)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|