query by (request.form)

query by (request.form)

am 04.05.2006 14:28:49 von amatuer

I usesd this to display info on a page:
<% While not rstMain.eof %>

<%= rstMain("Datum") %>

<%= rstMain("Act") %>
<%= rstMain("Item") %>
value="<%= rstMain("TR_ID") %>">

<% rstMain.movenext
Wend%>

on the next page i want the data from the checkbox.it comes as a
string,numerics concatanated with a ","


i want to query according to this checkbox n tried this code:


For i=1 to (len(request.form("Inv")))
If left(request.form("Inv"),i) = "," Then
count = count + 1
End If
Next


'For i=1 to count do
'var1=instr(request.form("Inv"),",")


'sql="SELECT * From V_Transaksie Where ID=" &
left(request.form("Inv"),var1-1)
'set rstMain = CreateObject("ADODB.Recordset")
'rstMain.Open sql, "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=sa;password=admin@sql;Initial Catalog=GIS;Data
Source=172.16.4.180",1,4


All above ASP.Please help

Re: query by (request.form)

am 04.05.2006 14:32:44 von Mike Brind

amatuer wrote:
> I usesd this to display info on a page:
> <% While not rstMain.eof %>
>
> <%= rstMain("Datum") %>
>
> <%= rstMain("Act") %>
> <%= rstMain("Item") %>
> > value="<%= rstMain("TR_ID") %>">
>
> <% rstMain.movenext
> Wend%>
>
> on the next page i want the data from the checkbox.it comes as a
> string,numerics concatanated with a ","
>
>
> i want to query according to this checkbox n tried this code:
>
>
> For i=1 to (len(request.form("Inv")))
> If left(request.form("Inv"),i) = "," Then
> count = count + 1
> End If
> Next
>
>
> 'For i=1 to count do
> 'var1=instr(request.form("Inv"),",")
>
>
> 'sql="SELECT * From V_Transaksie Where ID=" &
> left(request.form("Inv"),var1-1)
> 'set rstMain = CreateObject("ADODB.Recordset")
> 'rstMain.Open sql, "Provider=SQLOLEDB.1;Persist Security
> Info=False;User ID=sa;password=admin@sql;Initial Catalog=GIS;Data
> Source=172.16.4.180",1,4
>
>
> All above ASP.Please help

http://www.aspfaq.com/etiquette.asp?id=5004

Answered in general

--
Mike Brind

Re: query by (request.form)

am 04.05.2006 14:34:24 von Mike Brind

Mike Brind wrote:
> amatuer wrote:
> > I usesd this to display info on a page:
> > <% While not rstMain.eof %>
> >
> > <%= rstMain("Datum") %>
> >
> > <%= rstMain("Act") %>
> > <%= rstMain("Item") %>
> > > > value="<%= rstMain("TR_ID") %>">
> >
> > <% rstMain.movenext
> > Wend%>
> >
> > on the next page i want the data from the checkbox.it comes as a
> > string,numerics concatanated with a ","
> >
> >
> > i want to query according to this checkbox n tried this code:
> >
> >
> > For i=1 to (len(request.form("Inv")))
> > If left(request.form("Inv"),i) = "," Then
> > count = count + 1
> > End If
> > Next
> >
> >
> > 'For i=1 to count do
> > 'var1=instr(request.form("Inv"),",")
> >
> >
> > 'sql="SELECT * From V_Transaksie Where ID=" &
> > left(request.form("Inv"),var1-1)
> > 'set rstMain = CreateObject("ADODB.Recordset")
> > 'rstMain.Open sql, "Provider=SQLOLEDB.1;Persist Security
> > Info=False;User ID=sa;password=admin@sql;Initial Catalog=GIS;Data
> > Source=172.16.4.180",1,4
> >
> >
> > All above ASP.Please help
>
> http://www.aspfaq.com/etiquette.asp?id=5004

Should have been http://www.aspfaq.com/etiquette.asp?id=5003

--
Mike Brind