I am using the "MS Access Database Plugin"
found here: http://world.mapmasterz.com/plugins/DBP_TPC_MSAccess.zip
to read data
form MS Access file for a Question/Answer type of games.
it worked fine until I tried to work with multiple tables (switching)
when I try to select from another table then call data the game crash
well this happens ((only when the tables have different fields))
if the tables has the same field count and data type
it works
so is there a solution to this or is there a better plugin arround?
MDB_INIT
print str$(OpenMDB("test.mdb"))
wait key
Print str$(GetTable("table1"))
Print GetMDB(1,1)
wait key
Print str$(GetTable("table2"))
REM will crash here:
Print GetMDB(1,1)
wait key
end
Function OpenMDB(File$)
r = MDB_SetConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + File$)
EndFunction r
Function GetTable(Table$)
MDB_ClearDataSet
k = MDB_RunStatement("Select * From " + Table$)
EndFunction k
Function GetMDB(x,y)
ret$ = MDB_GetRowDataByColIndex(x,y)
EndFunction ret$
Snake_x86