473,418 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

How do I call ADODB Command.Execute() using JavaScript?

An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored procs, calling Execute() is no problem using javascript:
Expand|Select|Wrap|Line Numbers
  1.     var rs = cmd.Execute();
  2.  
However, for non-recordset returning stored procs -- and this app has many -- I need to call Execute() passing adExecuteNoRecords for the Options parameter, leaving the other parameters missing. For example, in vbscript:
Expand|Select|Wrap|Line Numbers
  1.     cmd.Execute , , adExecuteNoRecords
  2.  
How the heck do I make that call in JavaScript? It barfs when I try:
Expand|Select|Wrap|Line Numbers
  1.     cmd.Execute(, , adExecuteNoRecords);        //doesn't work
  2.  
Does anyone have a clue how to make this call?

Thanks!
--Mike



(Note: for the moment, I'm working around the problem by having JavaScript call a VBScript sub that performs the Execute call. Still, I would like to know the correct way of calling an object method from JavaScript having optional parameters not at the end of the parameter list.)
Aug 20 '08 #1
1 7144
jeffstl
432 Expert 256MB
This subject has seemed to come up multiple times lately.

It has also sparked some good discussions so don't take everything I say here as certainty.

However, javascript (assuming its set up how it typically is) runs locally on a browser. Therefore you cannot make requests to a database server in run time like this with it.

Secondly, things like ADODB are strictly microsoft objects that only server software can decipher (compile) and run. So no browser will have the capability to create an ADODB object. As a general statement, ADODB and javascript just do not work together (unless you are doing some kind of dynamic generation of ASP with javascript, hence the mention of the discussions sparked from this topic previously).
Sep 16 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: PiGei | last post by:
Hi all, I'm trying to build a function that - providing the dbname and the query name - show the results. I don't know how to solve this problem... when I try to insert the variable into this...
3
by: Chris | last post by:
Hello everyone I want to call a DB2 7.2 stored procedure via ADO in VC++ 7.1 It has 4 parameters, the 1st and the 4th are OUTPUT and the others are INPUT params. My code looks like this:...
5
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As...
0
by: Andre Azevedo | last post by:
Hi all ! I've created a .net serviced component with only one method. This method receive an ADODB.Command object and execute it. The ADODB.Command object is created in the client process. (VB...
5
by: Amaryllis | last post by:
I'm trying to call a CL which is located on our AS400 from a Windows application. I've tried to code it in different ways, but I seem to get the same error every time. Does anyone have any clue...
13
by: Marcin Wasilewski | last post by:
Hi, How to call procedure, which is on SQL Server from Access using visual basic? Thanks, mw
4
by: T | last post by:
-------------------------------------------------------------------------------- I tried this audit trail code, using 2003 and it works great, I try and use it at work w/97 and it blows up:...
3
by: mark_aok | last post by:
Hi all, All I am trying to do is open a table, edit it, and then close it. But I am having the strangest error. Here is my code Dim i as integer Dim rs as adodb.recordset Set rs = new...
1
by: dave.j.thornton | last post by:
I'm attempting to create a new table, and populate it using the fields from two existing tables. The code is printed below. I get the error: "Run-time error '-2147217900 (80040e14)': Syntax error...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.