The problem is that you're specifying a DSN in your connection string
when you appear to want to use a file location. Try this connection
string :-
myDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
server.MapPath("nwind.mdb")
Dan
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of
kako_00000
Sent: 22 August 2005 15:42
To: [email protected]
Subject: [AspClassicAnyQuestionIsOk] Find any word in database?
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
SPONSORED LINKS
Programming languages
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Programmin
g+languages&w2=C+programming+language&w3=Computer+programming+languages&
w4=Java+programming+language&w5=C+++programming+language&w6=History+of+c
omputer+programming+language&c=6&s=198&.sig=hjFSMmldhVc3zrT5SqL9xQ>
C programming language
<http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=Programmi
ng+languages&w2=C+programming+language&w3=Computer+programming+languages
&w4=Java+programming+language&w5=C+++programming+language&w6=History+of+
computer+programming+language&c=6&s=198&.sig=td85HQ93XfErfw7wfLZ86A>
Computer programming languages
<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=P
rogramming+languages&w2=C+programming+language&w3=Computer+programming+l
anguages&w4=Java+programming+language&w5=C+++programming+language&w6=His
tory+of+computer+programming+language&c=6&s=198&.sig=BMtgOo7dpsC1xzn1Ygp
BPg>
Java programming language
<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Progra
mming+languages&w2=C+programming+language&w3=Computer+programming+langua
ges&w4=Java+programming+language&w5=C+++programming+language&w6=History+
of+computer+programming+language&c=6&s=198&.sig=8IuywkhSLTtpB6_iFiJoCQ>
C programming language
<http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=Program
ming+languages&w2=C+programming+language&w3=Computer+programming+languag
es&w4=Java+programming+language&w5=C+++programming+language&w6=History+o
f+computer+programming+language&c=6&s=198&.sig=jpmDiGf8qD8AqZNqFwDO7w>
History of computer programming language
<http://groups.yahoo.com/gads?t=ms&k=History+of+computer+programming+lan
guage&w1=Programming+languages&w2=C+programming+language&w3=Computer+pro
gramming+languages&w4=Java+programming+language&w5=C+++programming+langu
age&w6=History+of+computer+programming+language&c=6&s=198&.sig=9slR1_vZJ
lvyOINA4iLkow>
________________________________
YAHOO! GROUPS LINKS
* Visit your group "AspClassicAnyQuestionIsOk
<http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
subscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
________________________________
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hlvrl7e/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124729571/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/