I just created a simple search page used for finding records so they can be edited or deleted. It can search by record ID, or one of three other text fields but it is only the ID that is needed for submission to the next form were the editing takes place. Problem is, it seems to require an exact text match and when it doesn't get one, it gives an ugly ODBC error. This is the part of the code that handles the text search, which was generated by DreamWeaver UltraDev:
[tt] ' find the record with the unique column value equal to the parameter value
MM_offset = 0
Do While (Not MM_rs.EOF)
If (Cstr(MM_rs.Fields.Item(MM_uniqueCol).Value) = param) Then
Exit Do
End If
MM_offset = MM_offset + 1
MM_rs.MoveNext
Loop[/tt]
Without changing the syntax much, does anyone know how this can be made to search on partial names and to give a "nicer" error if it doesn't find a match?
Also, if there are multiple matches, I am not sure how to deal with it because the search page, which is very simple, is for only one at a time.
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)
[tt] ' find the record with the unique column value equal to the parameter value
MM_offset = 0
Do While (Not MM_rs.EOF)
If (Cstr(MM_rs.Fields.Item(MM_uniqueCol).Value) = param) Then
Exit Do
End If
MM_offset = MM_offset + 1
MM_rs.MoveNext
Loop[/tt]
Without changing the syntax much, does anyone know how this can be made to search on partial names and to give a "nicer" error if it doesn't find a match?
Also, if there are multiple matches, I am not sure how to deal with it because the search page, which is very simple, is for only one at a time.
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)