View Single Post
  #1 (permalink)  
Old Nov 8th, 2005, 19:49
tolis tolis is offline
Junior Member
Join Date: Nov 2005
Age: 55
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Asp to MSAcess connection?

Hello to everybody

I am new in your forum and I have read almost all relative posts but still can not find a solution. So Please help

I have the site http://www.easytraveller.gr

I have uploaded in the db directory the file herdb.mdb and the file Connection1.asp in the wwwroot directory
I want to use the connection file to connect to the database and there execute recordsets at the file acropole_delphi.asp (This page is made with Dreamweaver)

The code in the connection1.asp is

Dim strConn
Set strConn = Server.CreateObject("ADODB.Connection")
strConn="DRIVER={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & "DBQ=" & Server.mappath("/db/herdb.mdb")

The code in the operational file the acropole_delphi.asp (the biggining and the code for the first recordset ) is

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connection1.asp" -->
<%
Dim rsMonths
Dim rsMonths_numRows

Set rsMonths = Server.CreateObject("ADODB.Recordset")
rsMonths.ActiveConnection = MM_Connection1_STRING
rsMonths.Source = "SELECT MONTH FROM MONTHS"
rsMonths.CursorType = 0
rsMonths.CursorLocation = 2
rsMonths.LockType = 1
rsMonths.Open()

rsMonths_numRows = 0
%>


When I try to see the file (on the internet) I am getting error message :

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/acropole_delphi.asp, line 8

The /acropole_delphi.asp, line 8 is this one :

rsMonths.ActiveConnection = MM_Connection1_STRING

Can someone tell me where I make a mistake? My opinion is that I get connection with the database and the problem is after the connection

Best regards
Tolis
Reply With Quote