This is a discussion on "Asp to MSAcess connection?" within the Classic ASP section. This forum, and the thread "Asp to MSAcess connection? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Asp to MSAcess connection?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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 |
|
|
|
#2
|
|||
|
|||
|
Re: Asp to MSAcess connection?
copy the above, save it into a file called "adovbs.inc" and include this file in your page:
|
|
#3
|
|||
|
|||
|
Re: Asp to MSAcess connection?
Thank you Sam
I have created the file and uploaded to the wwwroot directory The code (Part of it)of my asp page is like : <%@LANGUAGE="VBSCRIPT"%> <!--#include file="adovbs.inc" --> <% Dim rsMonths Dim rsMonths_numRows Set rsMonths = Server.CreateObject("ADODB.Recordset") rsMonths.ActiveConnection = MM_adovbs_STRING rsMonths.Source = "SELECT MONTH FROM MONTHS" rsMonths.CursorType = 0 rsMonths.CursorLocation = 2 rsMonths.LockType = 1 rsMonths.Open() rsMonths_numRows = 0 %> Trying to see the page in the internet I am getting the error message ADODB.Recordseterror '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 line in error is rsMonths.ActiveConnection = MM_adovbs_STRING Can you please tell me what I have to wright in this line (What is the ActiveConnection? since this is the line where the program stops Thank you again Tolis |
|
#4
|
|||
|
|||
|
Re: Asp to MSAcess connection?
oh right, in that case i think you should have:
|
|
#5
|
|||
|
|||
|
Re: Asp to MSAcess connection?
Thank you Sam
I have created the file and uploaded to the server and now everything is working fine The basic mistake was in the connectionstring. Now my Connection1.asp file looks like
Best regards Tolis Last edited by Rob; Nov 14th, 2005 at 12:25. Reason: PLEASE USE [CODE] [/CODE] TAGS |
|
#6
|
|||
|
|||
|
Re: Asp to MSAcess connection?
Cool, glad you got it working
|
|
#7
|
|||
|
|||
|
Re: Asp to MSAcess connection?
There should be a better way to do this and not to mention a much more effective and fast way...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
![]() |
| Tags |
| asp, msacess, connection |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic DSN-Less Connection to DB | Corey Bryant | Classic ASP | 7 | Oct 26th, 2007 06:08 |
| ODBC connection | go4kpo | PHP Forum | 2 | Jul 10th, 2007 14:20 |
| PHP n MySQL connection | uddin | PHP Forum | 1 | Apr 18th, 2007 06:41 |
| DB connection problem | Strike | Classic ASP | 1 | Jul 4th, 2006 09:45 |
| Database connection | fogofogo | Classic ASP | 7 | Dec 5th, 2005 14:25 |