Forums

ASP

This topic is locked

ADODB.Command error '800a0bb9' after connecting to remote db and executing Asp js page

Posted 13 Apr 2009 21:59:59
1
has voted
13 Apr 2009 21:59:59 Anand Dulare posted:
Hi

Ive managed to create a remote DB connection to my server and have the testing server URL prefixs connecting properly.

However when I run a blank ASP javascript page with no form and no objects it comes with the following error

ADODB.Command error '800a0bb9'

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

/Safaris_Home/Untitled-1.asp, line 5

Heres is the above code for the Untitled-1.asp and the Safaris.asp connection page

Untitled-1.asp

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/safaris.asp" -->
<%
var Recordset1_cmd = Server.CreateObject ("ADODB.Command";
Recordset1_cmd.ActiveConnection = MM_safaris_STRING; = (Error Line 5 from above)
Recordset1_cmd.CommandText = "SELECT * FROM [Holiday Information]";
Recordset1_cmd.Prepared = true;

var Recordset1 = Recordset1_cmd.Execute();
var Recordset1_numRows = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
<%
Recordset1.Close();
%>

Safaris.asp
<%
// FileName="Connection_ado_conn_string.htm"
// Type="ADO"
// DesigntimeType="ADO"
// HTTP="true"
// Catalog=""
// Schema=""
var MM_safaris_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/database1_test.mdb"
%>

The line 5 code points to the SQL connection string but there is noting I can see in the defining the SQL recordset query, but there seem to be noting wrong with the SQL syntax ?

Any help greatly apperciated

Kind Regards
Anand

Software : DW CS4
Os : Windows Vista

Edited by - Anand Dulare on 13 Apr 2009  22:02:40

Reply to this topic