473,395 Members | 1,846 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,395 software developers and data experts.

How to wire ActiveX control events sinks.

Dan
I am using ado and the record set ocx. I want to be able to receive
RecordsetChangeComplete events. I am running client side scripts and
want notification if someone else edits the data. The prototype for the
event is :
RecordsetChangeComplete reason,objErr,status,objRs so...
I did this:
function recordchanged(v1,v2,v3,v4)
{
alert("recordset changed");
}
var rs = new ActiveXObject("ADODB.Recordset");
rs.RecordsetChangeComplete=recordchanged;

It does not appear to be working. Can someone tell me how to wire up
the event sink for an activeX control in Javascript. Thanks, Dan

Mar 16 '06 #1
5 3880
On 16 Mar 2006 11:10:31 -0800, "Dan" <da*****@gmail.com> wrote:
I am using ado and the record set ocx. I want to be able to receive
RecordsetChangeComplete events. I am running client side scripts and
want notification if someone else edits the data. The prototype for the
event is :
RecordsetChangeComplete reason,objErr,status,objRs so...
I did this:
function recordchanged(v1,v2,v3,v4)
{
alert("recordset changed");
}
var rs = new ActiveXObject("ADODB.Recordset");
rs.RecordsetChangeComplete=recordchanged;


function rs::RecordsetChangeComplete

Jim.
Mar 16 '06 #2
Dan
Not sure what you mean but, doing something like
var rs = new ActiveXObject("ADODB.Recordset");
function rs::RecordsetChangeComplete(v1,v2,v3,v4)
{
alert("record changed");
}

this results in an Object expected error? Could you be a little more
specific as I am new to javascript?

Mar 16 '06 #3
On 16 Mar 2006 13:12:24 -0800, "Dan" <da*****@gmail.com> wrote:
Not sure what you mean but, doing something like
var rs = new ActiveXObject("ADODB.Recordset");
function rs::RecordsetChangeComplete(v1,v2,v3,v4)
{
alert("record changed");
}

this results in an Object expected error? Could you be a little more
specific as I am new to javascript?


<script>
rs = new ActiveXObject("ADODB.Recordset");
</script>
<script>
function rs::RecordsetChangeComplete(v1,v2,v3,v4)
{
alert("record changed");
}
</script>
(for various reasons which would be apparent if you read the JS spec,
but just trust that the initial creation and the assigning event
handlers need to be in seperate blocks.)

sorry for not mentioning it.

Jim.
Mar 16 '06 #4
Dan
Thanks

Mar 17 '06 #5
Dan
Thanks for the help. This still doesn't work but it is because ADO
Recordset events cannot be scripted with either javascrip or vbscript.

Mar 17 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is...
2
by: S.Kartikeyan | last post by:
Hello group, I have the follwing problem with microsoft web browser activex control. I have a fileopendialog control. I open different files in the IEActivex control based on the filename in the...
0
by: Peter | last post by:
I have a VB6 program which can receive Keydown events on an ActiveX control. The ActiveX control can't fire keydown events so I put a picturebox below the ActiveX control. I write codes in...
3
by: Weston Fryatt | last post by:
I have a custom written ActiveX Control (written in VC++ 7 unmanaged) that is embedded on a web page, I need to be able to send events (like button click and toolbar clicks) from the ActiveX...
0
by: swong4 | last post by:
Hi all, I am trying to use an ActiveX control on the server-side of an ASP.NET 2.0 application written in C#. The ActiveX control is a 3rd-party interface to a data feed used by my application...
2
by: Chu | last post by:
Thanks everyone for taking a moment to read this. I've got a page where I use a LinkButton and I wire up a dynamic event to the button. When the user clicks the button, the event is fired as...
6
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
0
by: Lee | last post by:
I have an activex control built with VS 2005, C#. I have a "Done" event that I fire from the control when some processing is done. I have tested this with a C++ app as the host, and I do get the...
0
by: miarfej | last post by:
Hi to all.. i am just new here, hoping to find some suggestions. I am writing a code in VC++. It is about creating an activeX control using MFC. This control exposes the properties and methods of...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.