Sub TableSchemaImport(BBDDDir As String, BBDDFile As String, TableName As String)
Dim MiResult As String
Dim Qry As String = "SELECT sql FROM sqlite_master WHERE type='table' AND name='" & TableName & "'"
If Main.Cifrado Then
Dim SQLCT As SQLCipher : SQLCT.Initialize(BBDDDir, BBDDFile, True, Main.DBPass, "")
Dim Schema As List = ExecuteMemoryTableC(SQLCT, Qry, Null, 1)
SQLCT.close
Else
Dim SQLNT As SQL : SQLNT.Initialize(BBDDDir, BBDDFile, False)
Dim Schema As List = ExecuteMemoryTable(SQLNT, Qry, Null, 1)
SQLNT.close
End If
If Schema.Size >= 1 Then
Dim Results() As String = Schema.Get(0)
MiResult = Results(0)
Else
MiResult = "SINDATO"
End If
Return MiResult
End Sub