Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP BATABASE, DSNless Connection, help me 1

Status
Not open for further replies.

duellsy

Programmer
Dec 28, 2000
4
AU
i am tryin to view info on 'accommodation.asp' file using the 'mbdata.mdb' database, and in the 'accommodation' part.
if u get me.....
anyway, i am having the error:

ADODB.Connection.1 error '800a0bb9'

The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.

/duellsy/a/accommodation.asp, line 23


can u please tell me how to fix this?
here is my asp script:
<head>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function dropdownmenu(item){
window.location.href=item.options[item.selectedIndex].value;}
</SCRIPT>


<font size=&quot;4&quot;><b>
Other related searches </b><form name=&quot;menu1&quot; align=&quot;left&quot;>
<select name=&quot;otherpages&quot; size=1
onchange=&quot;dropdownmenu(document.menu1.otherpages)&quot;>
<OPTION VALUE=&quot;*&quot;>Select
<OPTION VALUE=&quot;../m/motels.html&quot;>Motels

</select>
<blockquote><font size=&quot;4&quot;>


<%
Set MyConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
MdbFilePath = Server.MapPath(&quot;mbdata.mdb&quot;)
MyConn.Open &quot;Driver={Microsoft Access Driver (*.mdb)}; DBQ=&quot; &amp; MdbFilePath &amp; &quot;;&quot;
SQL_query = &quot;SELECT * FROM accommodation&quot;
Set RS = MyConn.Execute(SQL_query)
DO WHILE NOT RS.EOF
%>
Response.Write=(RS(&quot;Name&quot;))<br>
Response.Write=(RS(&quot;Address&quot;))<br>
Response.Write=(RS(&quot;Town&quot;))<br>
Response.Write=(RS(&quot;Ph&quot;))<br>
Response.Write=(RS(&quot;Mob&quot;))<br><br>
<%
RS.MoveNext
LOOP
%>
</BODY>
</HTML>
 
Make sure you have the correct verison of MDAC on the Server and also make sure you have the latest Service Pack. This is imperative.

ALSO
Take the = sign away from Response.Write &amp; place it within ASP

<%
Dim MyConn, RS, SQL_Query, MdbFilePath

Set MyConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
MdbFilePath = Server.MapPath(&quot;db1.mdb&quot;)
MyConn.Open &quot;Driver={Microsoft Access Driver (*.mdb)}; DBQ=&quot; &amp; MdbFilePath &amp; &quot;;&quot;
SQL_query = &quot;SELECT * FROM Table1&quot;
Set RS = MyConn.Execute(SQL_query)
DO WHILE NOT RS.EOF
Response.Write (RS(0)) %><br>
<% Response.Write (RS(1)) %><br>
<% Response.Write (RS(2)) %><br>
<% Response.Write (RS(3)) %><br>
<% Response.Write (RS(4)) %><br><br>
<% RS.MoveNext
LOOP
%>
 
that didn't make a difference:
it now has this:
Microsoft VBScript compilation error '800a0400'

Expected statement

/duellsy/a/accommodation.asp, line 26

WHILE NOT RS.EOF THEN
-----------------^
 
sorry, wrong file, but it stil did not work it had the same error as the original
 
i have found out that the server my site is hosted at is only on MDAC version 1.0, so i have 'TOLD' him to update to the latest version, being 2.60.
that should make a difference
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top