query by (request.form)

I usesd this to display info on a page:
<% While not rstMain.eof %>
<tr>
<td><font size="-1"><%= rstMain("Datum") %></font></td>
<!-- <td><font size="-1"><b>Client no</b></font></td> -->
<td><font size="-1"><%= rstMain("Act") %></font></td>
<td><font size="-1"><%= rstMain("Item") %></font></td>
<td><font size="-1"><input type="checkbox" name="Inv" id="Inv"
value="<%= rstMain("TR_ID") %>"></font></td>
</tr>
<% 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 [at] sql;Initial Catalog=GIS;Data
Source=172.16.4.180",1,4


All above ASP.Please help
amatuer [ Do, 04 Mai 2006 14:28 ] [ ID #1300927 ]

Re: query by (request.form)

amatuer wrote:
> I usesd this to display info on a page:
> <% While not rstMain.eof %>
> <tr>
> <td><font size="-1"><%= rstMain("Datum") %></font></td>
> <!-- <td><font size="-1"><b>Client no</b></font></td> -->
> <td><font size="-1"><%= rstMain("Act") %></font></td>
> <td><font size="-1"><%= rstMain("Item") %></font></td>
> <td><font size="-1"><input type="checkbox" name="Inv" id="Inv"
> value="<%= rstMain("TR_ID") %>"></font></td>
> </tr>
> <% 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 [at] 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
Mike Brind [ Do, 04 Mai 2006 14:32 ] [ ID #1300929 ]

Re: query by (request.form)

Mike Brind wrote:
> amatuer wrote:
> > I usesd this to display info on a page:
> > <% While not rstMain.eof %>
> > <tr>
> > <td><font size="-1"><%= rstMain("Datum") %></font></td>
> > <!-- <td><font size="-1"><b>Client no</b></font></td> -->
> > <td><font size="-1"><%= rstMain("Act") %></font></td>
> > <td><font size="-1"><%= rstMain("Item") %></font></td>
> > <td><font size="-1"><input type="checkbox" name="Inv" id="Inv"
> > value="<%= rstMain("TR_ID") %>"></font></td>
> > </tr>
> > <% 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 [at] 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
Mike Brind [ Do, 04 Mai 2006 14:34 ] [ ID #1300930 ]
Webserver » microsoft.public.inetserver.asp.db » query by (request.form)

Vorheriges Thema: Script timed out Message added to Binary File End
Nächstes Thema: Display Recordset MYSQL