Platforms to show: All Mac Windows Linux Cross-Platform
FAQ.Can I access Access Database with Java classes?
dim options(-1) as string// load all the jar files we have in a folder called java:dim appFolder as FolderItem = GetFolderItem("")Dim count as Integer = appFolder.Parent.Child("java").Countdim libjs() as stringFor i as Integer = 1 to count Dim f As FolderItem = appFolder.Parent.Child("java").item(i) If f <> Nil and f.Exists Then libjs.append f.NativePath+";" End IfNext// now init virtual machinedim librery as string = Join(libjs, "")dim vm as new JavaVMMBS(librery)if vm.Handle = 0 then MsgBox "Failed to initialize virtual machine"else // now make a new database connection with ucanaccess dim d as new JavaDatabaseMBS(vm,"net.ucanaccess.jdbc.UcanaccessDriver") Dim DbFile as FolderItem = appFolder.Parent.Child("Database11.accdb") dim j as JavaConnectionMBS = d.getConnection("jdbc:ucanaccess://"+DbFile.NativePath) // select and show values dim r as JavaResultSetMBS = j.MySelectSQL("Select * From test") while r.NextRecord MsgBox r.getString("FirstName") +" "+ r.getString("LastName") wend end ifException e as JavaExceptionMBSMsgBox e.message+" errorcode: "+str(e.ErrorNumber)
see website: http://ucanaccess.sourceforge.net/site.html