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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a procedure

Status
Not open for further replies.

mastermosley

Programmer
Jan 1, 2008
9
CA
I have public void Procedure() in a class, and I have a form. How do I call the procedure from the form?
 
I think we need a bit more information…Firstly I should mention (I apologise if this is common knowledge to you). You should not be accessing the database from the user interface.

Anyway..

Could you tell us what you have already tried then we don’t repeat what you have already done. Also are you getting any errors? What sort of procedure are you accessing (Select , insert, delete…)? What are you putting results into?

Age is a consequence of experience
 
if the class or method is static simply call
Code:
MyClass.Procedure();
if it's not static you need to instantiate the object before using it.
Code:
MyClass foo = new MyClass();
foo.Procedure();

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
My apologies.. Didn’t read that well at all, I must have had some New Year spirit in the eyes this morning. :(


Age is a consequence of experience
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top