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 SQL Stored Procedure from VB problem

Status
Not open for further replies.

ToeJamNEarl

Programmer
Jan 26, 2004
91
US
Hey guys and gals,

I was wondering does my stored procedure have to have a PUBLIC synonym for the users of my application to be able to call the stored procedure from VB?

If I have a LOCAL synonym created what all do I have to do in VB?

Appreciate any help.

Thanks,

-Diran
 
Uhhh... What's a synonym? (And which database management system is this?) Your usage of the term suggests that anyone can access a stored proc with a PUBLIC synonym, but that only certain, DBA-specified database users can access a stored proc with a LOCAL synonym. Do I infer correctly?

VB code can access a database as though it were a specific user. This is a common practice.

How to...? (You don't say which technology you plan to use to access the database. If you choose to use ADO, you'll need to select "Microsoft ActiveX Data Objects <version>" on the Project | References... menu dialog in the VB design environment.) With ADO, you can specify the UserID and Pwd values either inside the ADO connection string or as separate parameters to the Connection object's Open method. If you haven't used ADO before, there's lots of documentation available in the VB help, online, in books...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top