pass a form input as a parameter to an access quer
HI,
I'm new to asp/javascript and am strugglling to get to grips with using a form input as an input to a stored procedure in Access.
I've seen a lot of code for VbScript and Ole Db (i'm using odbc) and am still confused!!
Basically I have the following code:
<%@LANGUAGE="JAVASCRIPT"%>
</head>
<body>
<%
var dbConn = Server.CreateObject("ADODB.Connection");
dbConn.Open("custconn");
var dbComm = Server.CreateObject("ADODB.Command");
dbComm.commandtext = "cityQuery";
dbComm.commandtype = adCmdStoredProc;
var objParam = dbComm.CreateParameter("City", adVarChar, adParamInput);
dbComm.Parameters.Append(dbComm);
objCommand.Parameters("City") = "London";
dbComm.activeconnection = dbConn;
var rSet = Server.CreateObject("ADODB.Recordset");
dbComm.execute();
%>
</body>
</html>
I'm looking to return all records whose city value is 'London'
I'm trying to kinda copy VBScript examples but really am coming up against the wall...as i said...this is all pretty new territory to me.
Does anyone have some url's that will go through this on a pretty basic or simple level..
apologies for posting on two different sections...
thanks
alan
|