views:

38

answers:

1

How do I link an odbc object to a stored procedure I have written. Please see example below:

The following code executes a stored procedure called DEPT_Add, yet the name of the object function is AddDepartment.

Set oDept = Server.CreateObject("JTQTMS.JTDept")
bReturn = oDept.AddDepartment(CStr(sDeptName))

My question is if I add a new stored procedure called PROPERTY_Add for example, how would I go in and add an object function called AddProperty.

The below code does not seem to be working because I cannot find out where to create and link the AddProperty method to my stored proc PROPERTY_Add.

Set oProp = Server.CreateObject("JTQTMS.JTProperty")
bReturn = oProp.AddProperty(CStr(sDeptName), CStr(sDeptDescription))
+1  A: 

This looks to me like JTQTMS.JTDept is a class of a COM component.
The class being JTDept, and the COM component being JTQTMS.

Look in Component Services (if i've remembered correctly), and see if you can find any references to it there.

I believe what is happening is the AddDepartment method of the COM component is calling the Dept_Add stored procedure internally.

To do the same with Property__Add, you'd need to add the AddProperty method to the COM component, which in turn calls the Property_Add stored procedure.

Bravax