It looks like this:
Dim m As Map
m.Initialize 'clear the map
m.Put("Patient_No", DBUtils.DB_TEXT)
m.Put("First_Name", DBUtils.DB_TEXT)
m.Put("Last_Name", DBUtils.DB_TEXT)
m.Put("Date_of_Birth", DBUtils.DB_INTEGER)
m.Put("Sex", DBUtils.DB_TEXT)
m.Put("Patient_ID", DBUtils.DB_INTEGER)
DBUtils.CreateTable(sq, "Patients", m, "") 'no primary key assigned
m.Initialize 'clear the map
m.Put("ExamTime", DBUtils.DB_INTEGER)
m.Put("ExamPatient_ID", DBUtils.DB_INTEGER)
m.Put("ExamData", DBUtils.DB_BLOB)
DBUtils.CreateTable(sq, "Exams", m, "") 'no primary key assigned
DBUtils.SetDBVersion(sq, 2)
So one table of Patients, each patient has a patient ID field amongst the fields. Then an Exams table, which also contains a patient ID so that I can track which exam belongs to which patient.
The database is working fine mostly, its just dealing with the ExamData blobs that is torturing me. Making slow progress now that I got the rapid debugger going with USB debug. I ca see that if I extract a Map of ExamData that there is stuff in there, just looking at whether its the expected size and working out how to dcode it back into my Type so I can work with it.
This is what the watch window tells me is in the Map after extraction from the DDB:
[[waveform=[point=[LSpiroConnect.Home.types$_flowvoltime;@220af330, IsInitialized=true], result=[Index=[S@22198d50, IsInitialized=true], IsInitialized=true
], [waveform=[point=[LSpiroConnect.Home.types$_flowvoltime;@22071fd8, IsInitialized=true], result=[Index=[S@22071f98, IsInitialized=true], IsInitialized=true
], [waveform=[point=[LSpiroConnect.Home.types$_flowvoltime;@22041eb0, IsInitialized=true], result=[Index=[S@22041e70, IsInitialized=true], IsInitialized=true
], [waveform=[point=[LSpiroConnect.Home.types$_flowvoltime;@22046580, IsInitialized=true], result=[Index=[S@22046540, IsInitialized=true], IsInitialized=true
], [waveform=[point=[LSpiroConnect.Home.types$_flowvoltime;@2204ac50,......