Cannot Find Installable ISAM Exception
The following code generates the exception on o_DBEngine.CreateDatabase:
Public Sub New()
Dim o_DBEngine As New DBEngine
Dim o_Database As DAO.Database
Dim o_WorkSpace As DAO.Workspace
Dim o_TableDef As New TableDef
' Create and open the main database
If (Dir(Application.StartupPath + "\" + modUtilities.DATABASE_NAME) = "") Then
Try
InitializeComponent()
o_DBEngine.CreateDatabase(modUtilities.DATABASE_NAME, "General") <-------- EXCEPTION ON THIS LINE
o_WorkSpace = o_DBEngine.CreateWorkspace(MAINWS, "admin", "")
o_Database = o_DBEngine.Workspaces(MAINWS).OpenDatabase(modUtilities.DATABASE_NAME)
o_TableDef.Name = "Person"
o_TableDef.CreateField("PersonID", DAO.DataTypeEnum.dbLong)
o_TableDef.Fields("PersonID").Attributes = DAO.FieldAttributeEnum.dbAutoIncrField
o_TableDef.CreateField("FirstName", DAO.DataTypeEnum.dbText, 255)
o_TableDef.CreateField("LastName", DAO.DataTypeEnum.dbText, 255)
Catch o_Exception As Exception
MsgBox("Exception: " + o_Exception.Message)
End Try
End If
End Sub
Has anybody over come this? I have re-installed MDAC 2.8 to no avail. I'd really appreciate some help. Thank you.
Re: Cannot Find Installable ISAM Exception
I think you use incorrect parameters in CreateDatabase:
http://msdn.microsoft.com/en-us/libr...ffice.15).aspx
But I never used DAO, it's obsolete for a long time
Re: Cannot Find Installable ISAM Exception
i remember this error coming from some broken installation. There is a MS tool somewhere out there that checks all DAO components and compatibility. I remember beeing able to resolve this error some 10 years ago using this tool.
Re: Cannot Find Installable ISAM Exception
If I was you, I would start changing to a more current Database system. Sorry I can't help you with this.
Re: Cannot Find Installable ISAM Exception
It would be more informative if you could name the exception you're getting, but I suspect that you're running this on a 64-bit machine. DAO is 32-bit so you must change the Target CPU setting. In VS click Project > Project Name Properties and on the Compile tab change the Target CPU to x86.
Re: Cannot Find Installable ISAM Exception
I would check that the database was saved in the correct file format for the version of the DB.Engine you are using.
Re: Cannot Find Installable ISAM Exception
Quote:
Originally Posted by
Nightwalker83
I would check that the database was saved in the correct file format for the version of the DB.Engine you are using.
He gets the exception when he tries to create the database. So the database doesn't exist yet.