### Find Table

Example Sub searching for a Table in a SQLite Database
'Searches for a Table in the Database. The Searchcriteria are non case intensive.
'Example:
'FindTable(SQLObj, SQLDB, ftFindTable.Text) where SQLObj As SQL, SQLDB As String = "items.db", ftFindTable As TextField
`Sub FindTable(mSQLObj As SQL, mDB As String, mTable As String) As Boolean
Dim Result As Boolean
Dim Hdg As String = $"Find Table in ${mDB}"$
Dim cursor As ResultSet
cursor = mSQLObj.ExecQuery($"SELECT name FROM sqlite_master WHERE type='table' AND name = '${mTable}' COLLATE NOCASE;"$)
If cursor.NextRow Then
fx.Msgbox(Null, $"Table ${mTable} found:${CRLF}${cursor.GetString2(0)}"$, Hdg)
Result = False
Else
fx.Msgbox(Null, $"Table ${mTable} not found."$, Hdg)
Result = True
End If
Return Result
End Sub`

Changed: , Category: SQLite, File: T6C254M1822.htm, ID: 1822