Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MTS Sample

Status
Not open for further replies.

gust1480

Programmer
Mar 19, 2002
148
PH
Can somebody please give me a working sample using the setabort and setcomplete?
 
here is the code which will help u
Regards
Nouman

On Error GoTo ErrH
Dim ObjContext As ObjectContext
Dim objDOLogo As New clsDOOrdersT


Set ObjContext = GetObjectContext()

Dim objCmdTask As New ADODB.Command


With objCmdTask
.CommandType = adCmdStoredProc
Set .ActiveConnection = DBConnection(varInfo(INT_CONNECTSTRING))
.CommandText = "stp_EMB_InsertLogo"

.Parameters.Append .CreateParameter(STR_PRM_ORD_ORDERITEMID, adInteger, adParamInput, 4, mintOrderItemID)
.Execute

End With

ObjContext.SetComplete

Exit Function

ErrH:
ObjContext.SetAbort
Err.Raise Err.Number, Err.Source, Err.Description
 
How to let this sample run on Windows 2000 prof ? It's impossible to create ObjectContext object on Windows 2000 prof.

pls help
 

Dear ;

It is possible to create object context on Win2K professional. You can use Component Services in win2000 professional same as you use on Server. It is equivalent to MTS i.e. on Win NT. Go in Control Panel and then open Administrative Tools and then you will find Component Service actually it is MTS.

Now , you will have to run this code in VB and to do this you will have to create a DLL for which will run under the Component Service. To do it open a EXE and call that function of the created DLL from EXE then you can test this code. First Run DLL and then run EXE. You will have to deploy this DLL in Component Service in a package.
I think you know how to create this testing envoirnment. If you don't know then please tell I'll tell you in details.

Regards,
Essa Mughal Muhammad Essa Mughal
Software Engineer
essamughal@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top