Hello all
this one has me stumped, the strid var is the value of the field and strsearch is the field name. The funny thing is if strsearch is the autonumber (named ID) then it works but if I try a different column name (named tooling) I get "No value given for one or more required parameters"
or "datatype mismatch" depending on the value of strid
am I missing some typo? all fields besides autonumber are text fields and database is access 2000
btw have done a response.write and the command looks good
it comes out " SELECT from tblremake where tooling = aaa1234 "
any help would be greatly appreciated!
Charles
<%
dim con, rs
dim strid, strsearch
strid= request.form("txtnum"
strsearch= request.form("searchtype"
set con = Server.CreateObject("ADODB.Connection"
set rs = Server.CreateObject("ADODB.Recordset"
con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Jobs\ocar.mdb"
Sql="SELECT * from tblremake WHERE "
Sql=Sql & strsearch
Sql=Sql & " = "
Sql=Sql & strid
rs.open (Sql), con
%>
this one has me stumped, the strid var is the value of the field and strsearch is the field name. The funny thing is if strsearch is the autonumber (named ID) then it works but if I try a different column name (named tooling) I get "No value given for one or more required parameters"
or "datatype mismatch" depending on the value of strid
am I missing some typo? all fields besides autonumber are text fields and database is access 2000
btw have done a response.write and the command looks good
it comes out " SELECT from tblremake where tooling = aaa1234 "
any help would be greatly appreciated!
Charles
<%
dim con, rs
dim strid, strsearch
strid= request.form("txtnum"
strsearch= request.form("searchtype"
set con = Server.CreateObject("ADODB.Connection"
set rs = Server.CreateObject("ADODB.Recordset"
con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Jobs\ocar.mdb"
Sql="SELECT * from tblremake WHERE "
Sql=Sql & strsearch
Sql=Sql & " = "
Sql=Sql & strid
rs.open (Sql), con
%>