Discussion Locked
0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am having trouble passing input variables to an Access DB selector using the 'Like' qualifier on an asp. I am using Frontpage 2002. Any help would be appreciated.
3 replies
by andrew
The following code works for me:
<%Option Explicit%>
<%
Dim sDSN
Dim oCon
Dim oRS
on error resume next
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=z:\avg.mdb;"
Dim sSql
Set oRS=server.CreateObject("ADODB.recordset")
sSql = "SELECT [id],[name] FROM Table3 WHERE Name LIKE '%John%';"
oRS.Open sSql,sDSN
oRS.MoveFirst
Do while not oRS.EOF
Response.Write ""
Response.Write oRS.Fields("Name") & "" & vbCrLf
oRS.movenext
loop
%>
by mark
Poster rated this answer
by mark
This question was closed by the author
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
0 helpful
1 reply
0 helpful
1 reply
0 helpful
1 reply
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply