Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Calling 2 stored procedures

Author  Topic 

Rajeswari
Starting Member

20 Posts

Posted - 2002-01-03 : 08:32:19
I have to copy data from 20 tables from source database to destination database and delete the records from source database. Records are copied which satisfies specific condition(like timevalue between starttime and endtime or recordcount for each table). I am using 2 stored procedures to copy and delete the records. In delete stored procedure i am passing the recordcount of each table as a string(e.g 1000,2000,10,30,50....) My one application will be inserting records to the database, so moving the data will be online.
Record count is taken inside the copy stored procedure and send as a parameter to second stored procedure. Since deletion of records takes long time, the timeout occurs.

create procedure test
as
begin
Call copy stored procedure
call delete stored procedure
end

Copy is successful, but deletion is not succesful, if i run individual stored procedures through query analyser, there is no problem, but if i run "Exec test", or from VB application then deletion is not successful, if i debug it works fine.

Any suggestions please.



Nazim
A custom title

1408 Posts

Posted - 2002-01-03 : 08:37:09
Therez a similar post to which i have answered. you can check it. but am not sure whether the problem is solved or not.

Follow this link
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=11803

and do give your feedback .


HTH

----------------------------
Anything that Doesn't Kills you Makes you Stronger
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-01-03 : 09:47:25
Check this topic: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=11805

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

Nazim
A custom title

1408 Posts

Posted - 2002-01-08 : 02:22:56
If you are using Sql 2000 CE Edition, this should help u.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q303004


----------------------------
Anything that Doesn't Kills you Makes you Stronger
Go to Top of Page
   

- Advertisement -