Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 25th, 2005, 09:06 PM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to howbadboy
Default 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


  #2 (permalink)  
Old March 1st, 2005, 05:49 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi,
Can u find this link
http://www.google.com/search?hl=en&l...+in+Access+asp
it will help you.

surendran
(Anything is Possible)


Similar Threads
Thread Thread Starter Forum Replies Last Post
pass-through query with input parmeter jimmy Access 4 February 8th, 2018 10:21 AM
pass parameter naeem_ul_hussan Classic ASP Basics 2 August 30th, 2007 11:18 AM
SqlDataSource Input parameter sg225551 ASP.NET 2.0 Basics 0 January 16th, 2007 10:54 AM
input parameter avbnewb VB Databases Basics 0 February 7th, 2006 10:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.