Hi
I’m looking up a database. I put this code in a Method. I’m getting “unable to use function MATCH in the requested context”
(But it works fine without MATCH, for example this works: sql = “SELECT * FROM micadtable” and it shows the first row fine.)
sql = "SELECT buzzword FROM micadtable WHERE buzzword MATCH 'Klee';"
rs = micadtextfile.SQLSelect(sql)
If rs <> Nil and not micadtextfile.error Then
While Not rs.EOF
'Get all Data
DIM_record_number = rs.IdxField(1).StringValue
DIM_buzzword = rs.IdxField(2).StringValue
That said I dont see that error here using a non-FTS table
dim micadtextfile as new SQLiteDatabase
if micadtextfile.connect() then
micadtextfile.sqlexecute("create table micadtable( buzzword )")
dim sql as string = "SELECT buzzword FROM micadtable WHERE buzzword MATCH 'Klee';"
dim rs as recordset = micadtextfile.SQLSelect(sql)
If rs <> Nil and not micadtextfile.error Then
While Not rs.EOF
'Get all Data
dim DIM_record_number as string = rs.IdxField(1).StringValue
dim DIM_buzzword as string = rs.IdxField(2).StringValue
wend
end if
end if
[quote]The MATCH operator is a special syntax for the match() application-defined function. The default match() function implementation raises an exception and is not really useful for anything. But extensions can override the match() function with more helpful logic.
[/quote]
I’m seeing the database - the code below works fine. Just can’t use = or Match to search the database. I’ve tried quite a few things. (The database is full of info already typed in. Do I really need to ‘create table’ ?)
sql = "SELECT * FROM micadtable"
rs = micadtextfile.SQLSelect(sql)
If rs <> Nil and not micadtextfile.error Then
While Not rs.EOF
DIM_record_number = rs.IdxField(1).StringValue
DIM_buzzword = rs.IdxField(2).StringValue
'MESSAGE BOX
MsgBox( DIM_record_number +DIM_buzzword )
rs.MoveNext
wend
rs.Close
else
MsgBox("Error: " + micadtextfile.ErrorMessage)
End If