Question
OLEDB
Hello,
I have seen connectionstrings.com and I guess I am feeling dumb. So how do I go about changing this code to work with OLEDB. right now this code works great on my machine but i never works on my host's machine.
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/myCars.asp" -->
<%
var csSold_cars__MMColParam = "Y";
if (String(Request("MM_EmptyValue")) != "undefined" &&
String(Request("MM_EmptyValue")) != "") {
csSold_cars__MMColParam = String(Request("MM_EmptyValue"));
}
%>
<%
var csSold_cars = Server.CreateObject("ADODB.Recordset");
csSold_cars.ActiveConnection = MM_myCars_STRING;
csSold_cars.Source = "SELECT * FROM [Car Details] WHERE Sold LIKE '%"+ csSold_cars__MMColParam.replace(/'/g, "''") + "%'";
csSold_cars.CursorType = 0;
csSold_cars.CursorLocation = 2;
csSold_cars.LockType = 1;
csSold_cars.Open();
var csSold_cars_numRows = 0;
%>
<%
var Repeat1__numRows = 3;
var Repeat1__index = 0;
csSold_cars_numRows += Repeat1__numRows;
%>
1) do in need a connections/mycars.asp page with OLEDB?
2) connection strings gives the following
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;"
3) personally i don't care if I am ODBC or OLEDB but I can't get this to work on my providers website so I am going to try anything.
4) this code was basically selecting one recordset and filtering out the cars with "Y" in one of the fields. I just have no clue why this is so easy on my local machine but never works on my hosts machine. I am just praying I can get a bit of help here. Thank you and have a good night.
I have seen connectionstrings.com and I guess I am feeling dumb. So how do I go about changing this code to work with OLEDB. right now this code works great on my machine but i never works on my host's machine.
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/myCars.asp" -->
<%
var csSold_cars__MMColParam = "Y";
if (String(Request("MM_EmptyValue")) != "undefined" &&
String(Request("MM_EmptyValue")) != "") {
csSold_cars__MMColParam = String(Request("MM_EmptyValue"));
}
%>
<%
var csSold_cars = Server.CreateObject("ADODB.Recordset");
csSold_cars.ActiveConnection = MM_myCars_STRING;
csSold_cars.Source = "SELECT * FROM [Car Details] WHERE Sold LIKE '%"+ csSold_cars__MMColParam.replace(/'/g, "''") + "%'";
csSold_cars.CursorType = 0;
csSold_cars.CursorLocation = 2;
csSold_cars.LockType = 1;
csSold_cars.Open();
var csSold_cars_numRows = 0;
%>
<%
var Repeat1__numRows = 3;
var Repeat1__index = 0;
csSold_cars_numRows += Repeat1__numRows;
%>
1) do in need a connections/mycars.asp page with OLEDB?
2) connection strings gives the following
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;"
3) personally i don't care if I am ODBC or OLEDB but I can't get this to work on my providers website so I am going to try anything.
4) this code was basically selecting one recordset and filtering out the cars with "Y" in one of the fields. I just have no clue why this is so easy on my local machine but never works on my hosts machine. I am just praying I can get a bit of help here. Thank you and have a good night.
