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

calling a PL/SQL Script

Status
Not open for further replies.

ToeJamNEarl

Programmer
Jan 26, 2004
91
US
Hey guys,

I searched the forums and found a sort of related thread about running a PL/SQL script from VB, but I am kind of confused on that. It seems that the PL/SQL script has to be located on the oracle database?

I have the pl/sql script as a separate file on the computer's hard drive. What all is necessary to make the VB program execute this script? I would appreciate any help possible. It's hard to find any data wit GOOGLE
[morning]

Thanks,

-Diran
 
Call the stored procedure by name, in the same fashion as you would pass through any SQL string from VB. For example. you might pass a simple SQL string like so;

Code:
strSQL = "SELECT * FROM <tablename>"
Set mRs = mCn.Execute(strSQL)

To call a stored procedure you should replace strSQL with the name of the procedure, like so;

Code:
strSQL = "MyStoredProc"
Set mRs = mCn.Execute(strSQL)

Remember to include any variables the procedure requires, in single quotes if necessary.

DaveMere
 
Thanks a bunch Dave

I'll be giving that a shot in the next couple of days.

I'll keep you all posted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top