Forum Moderators: open

Message Too Old, No Replies

Asynchronous loading from access database through adodb

         

Greven

4:32 am on Jun 22, 2007 (gmt 0)

10+ Year Member



I am trying to develop a tool for myself at work where I can read/write from a access database stored on a network drive. Everything works fine, but I would like to make the request asynchronous, if possible.

This is only running on IE 6.0 so I am using:

var cndb = new ActiveXObject( "adodb.connection" );
var rs = new ActiveXObject( "ADODB.Recordset" );

The actual command I am using to open the record set is:

rs.Open( local_sql, get_info.connection, 0, 1, 0x10 );

According to msdn [msdn2.microsoft.com], this should be correct for what I want ( 0x10 specifying asynchronous). However, how do I detect when it is done, or specify a function to call when completed? I can't seem to find this anywhere, and all the google searches I've tried have brought up only VB script.

Any help would be muchly appreciated, thanks.

[edited by: Greven at 4:33 am (utc) on June 22, 2007]

rocknbil

6:51 am on Jun 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is most likely because what you are doing is done with .ASP or VBScript, I don't even know that you can do this with Javascript. You might get some help over in The MS/ASP.net forum [webmasterworld.com].

Bernard Marx

9:08 am on Jun 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's possible to use Javascript (JScript) in all such scripting environments (WScript, ASP). Only a small amount of people actually do.

I always use JScript. I never saw te point in learning VBScript.

However, I know nothing about asynchronous DB queries. Maybe I'll take a look.

Bernard Marx

9:28 am on Jun 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It looks like the Recordset object has a
FetchComplete
event. To use this, I'm guessing that you won't be able to use ActiveXObject to create the Recordset. The method doesn't provide an argument for an identifier. Need to use the createObject method (or use an <object> element in HTML/HTA/WSF).

rocknbil is right to suggest popping over to the other forum for this, where they know their ADO. They may force you to use an evil, curly bracketless language though.

Greven

11:17 pm on Jun 22, 2007 (gmt 0)

10+ Year Member



I've been looking all over and I can't find any reference for a class breakdown of the activex ADODB.recordset object, and all the methods that should work for assigning an event isn't working, so I'm gonna give up for now. Hopefully someone else might have some insight into this