hello i am open this link http://learnasp.com/learn/SQLwhereform1.asp
and in this code copy past in notepad and save this name
SQLwhereform1.asp
code this
<HEAD><TITLE>sqlwhereform1.asp</TITLE></HEAD>
<HTML><body bgcolor="#FFFFFF">
<Form action = "sqlwhereForm1respond.asp" method=GET>
Choose A State:<p>
State: <Input NAME="st" MaxLength="2" size="3"><P>
<Input type="submit" value="Get Data"> <Input type="reset"
value="Clear State"></form>
</BODY></HTML>
then i am creating form action save this name
sqlwhereForm1respond.asp
code this
<HEAD><TITLE>sqlwhereform1respond.asp</TITLE></HEAD>
<HTML><body bgcolor="#FFFFFF">
<%
myDSN="DSN=student;uid=student;pwd=magic"
mystate=request.querystring("st")
SQLtemp="select * from publishers where state='"
SQLtemp=SQLtemp & mystate & "'"
call query2table(SQLtemp,myDSN)
%>
<!--#include virtual="lib_dbtable.asp"-->
</BODY></HTML>
And then create this file lib_dbtable.asp
code this
<%
sub query2table(inputquery, inputDSN)
dim conntemp, rstemp
set conntemp=server.createobject("adodb.connection")
conntemp.open inputDSN
set rstemp=conntemp.execute(inputquery)
howmanyfields=rstemp.fields.count -1%>
<table border=1><tr>
<% 'Put Headings On The Table of Field Names
for i=0 to howmanyfields %>
<td><b><%=rstemp(i).name%></B></TD>
<% next %>
</tr>
<% ' Now lets grab all the records
do while not rstemp.eof %>
<tr>
<% for i = 0 to howmanyfields
thisvalue=rstemp(i)
If isnull(thisvalue) then
thisvalue=" "
end if%>
<td valign=top><%=thisvalue%></td>
<% next %>
</tr>
<%rstemp.movenext
loop%>
</table>
<%
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
end sub%>
when i am open localhost/MyWeb/SQLwhereform1.asp show the form and i
am put the date to search when i am click get data this page show
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
/MyWeb/lib_dbtable1.asp, line 5
what problem
And not show Access file name in this any plase. my Access file name
nwind.mdb
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hldn1k8/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124728932/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/