Have code module, holding various "enums", one of them being this one:
The commented code block is fine, but the next code block shows an error:
Main - 16338: Syntax error.
Main - 16337: Unknown member: enums
Any idea what is wrong with this code block?
RBS
B4X:
Sub Process_Globals
Type DataBase(Main As Int, _
NON_CLINICAL As Int, _
KVS As Int)
Public eDataBase As DataBase
eDataBase.Main = 0
eDataBase.NON_CLINICAL = 1
eDataBase.KVS = 2
I am using this in a Sub in Main:
Sub CountObjectRows(bShowProgress As Boolean, strObject As String, iDatabase As Int)
Dim strSQL As String
' strSQL = "create table if not exists OBJECT_ROWS(OBJECT_NAME TEXT, ROWS INTEGER)"
' If iDatabase = Enums.eDataBase.Main Then
' General.cConn.SQLMain.ExecNonQuery(strSQL)
' Else
' If iDatabase = Enums.eDataBase.NON_CLINICAL Then
' General.cConn.SQLNon_Clinical.ExecNonQuery(strSQL)
' Else
' General.cConn.SQL_KVS.ExecNonQuery(strSQL)
' End If
' End If
strSQL = "create table if not exists OBJECT_ROWS(OBJECT_NAME TEXT, ROWS INTEGER)"
Select Case iDatabase
Case Enums.eDataBase.Main
General.cConn.SQLMain.ExecNonQuery(strSQL)
Case Enums.eDataBase.NON_CLINICAL
General.cConn.SQLNon_Clinical.ExecNonQuery(strSQL)
Case Enums.Enums.eDataBase.KVS
General.cConn.SQL_KVS.ExecNonQuery(strSQL)
End Select
The commented code block is fine, but the next code block shows an error:
Main - 16338: Syntax error.
Main - 16337: Unknown member: enums
Any idea what is wrong with this code block?
RBS