Question about Basic Maker 2018

Post Reply
AshleyDennison
Posts: 10
Joined: Fri Nov 23, 2007 11:04 am

Question about Basic Maker 2018

Post by AshleyDennison »

Can BM scripts directly access dbf databases, perhaps using ADO or some other methods?
hen
Posts: 7
Joined: Sat Dec 06, 2014 6:53 pm

Re: Question about Basic Maker 2018

Post by hen »

yes we can...
a sample with the biblio.dbf shipped with SM

Code: Select all

Set oDAO36 = CreateObject("DAO.DBEngine.36")
Set oDbf = oDAO36.OpenDatabase("C:\Documents and Settings\<USERNAME>\<My documents>\SoftMaker",False,False,"dBASE 5.0")
Set oRS = oDbf.OpenRecordset("biblio")
For i = 1 To oRS.RecordCount
	sBuf = sBuf & oRS.Fields(0) & "  " & oRS.Fields(1) & chr(13)
	oRS.MoveNext
Next
Msgbox(sBuf)
<USERNAME> and <My documents> are specific to your pc
Post Reply

Return to “BasicMaker 2018 for Windows”