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

Refresh a SQL Server 2000 Database

Status
Not open for further replies.

vmaruv

Programmer
Apr 8, 2002
102
US
This is urgent. Please help.

I am compiling a stored procedure using osql utility in batch files using shell command from my VB code. Later I am executing this stored procedure by click of a button from my VB 6 code. The problem is this stored procedure created is not being refreshed in the database. It gives me an error "Stored procedure does not exist" and this happens only the first time. Later on when I try click the same button to execute it executes fine.

Looks like a refresh problem to me. Is there a way I can refresh the database (SQL Server 2000) from my vb code ?

Please advice.
 
Perhaps you can query to make sure it exists:

select * from dbo.sysobjects where id = object_id(N'[dbo].[[red]StoredProcNameHere[/red]]')

 
Thanks Sheco I will try this. However, I tried to use a different database and then use this again so that the objects gets refreshed. But it did not work. Perhaps this might work. I will try. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top