dbTalk Databases Forums  

Cannot immediately select after executing DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Cannot immediately select after executing DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jordan
 
Posts: n/a

Default Cannot immediately select after executing DTS - 07-11-2005 , 09:24 AM






Hi,

I am using C# to execute a stored procedure to execute a DTS. The DTS
executes alright. It is a simple DTS to do a direct copy from excel to
SQL table.

The problem is when I attempt to retrieved the data inserted, it
returns nothing. After some extensive testing, I found out that I had
to wait for about half a minute or more before executing any select
statements.

Anyone had any idea how I can rectify this? Any help would be greatly
appreciated.

Thanks.

----
Jordan


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Cannot immediately select after executing DTS - 07-11-2005 , 01:42 PM






Sounds like the default timeout on a connection. When you pump from Excel
to SQL Server do you set "close Connection on completion" in the workflow
properties?

What locks do you see on the SQL Server table?


Have you tried "WITH (NOLOCK)

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Jordan" <jordanm (AT) 37 (DOT) com> wrote

Quote:
Hi,

I am using C# to execute a stored procedure to execute a DTS. The DTS
executes alright. It is a simple DTS to do a direct copy from excel to
SQL table.

The problem is when I attempt to retrieved the data inserted, it
returns nothing. After some extensive testing, I found out that I had
to wait for about half a minute or more before executing any select
statements.

Anyone had any idea how I can rectify this? Any help would be greatly
appreciated.

Thanks.

----
Jordan




Reply With Quote
  #3  
Old   
Jordan
 
Posts: n/a

Default Re: Cannot immediately select after executing DTS - 07-12-2005 , 09:24 AM



Hi,

I did check on the "Close connection on completion". The scenario is
applicable to the table used in the DTS. Selecting from other tables is
alright.

"Exec sp_lock" returns type of "TAB" and Mode of "IS". I assume that
statement is to check the lock. How do I make use of the WIth (NOLOCK).

Thanks.

---
Jordan


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Cannot immediately select after executing DTS - 07-12-2005 , 02:09 PM



SELECT <col list> FROM TABLE WITH (NOLOCK)

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Jordan" <jordanm (AT) 37 (DOT) com> wrote

Quote:
Hi,

I did check on the "Close connection on completion". The scenario is
applicable to the table used in the DTS. Selecting from other tables is
alright.

"Exec sp_lock" returns type of "TAB" and Mode of "IS". I assume that
statement is to check the lock. How do I make use of the WIth (NOLOCK).

Thanks.

---
Jordan




Reply With Quote
  #5  
Old   
Jordan
 
Posts: n/a

Default Re: Cannot immediately select after executing DTS - 07-13-2005 , 08:39 PM




"WITH (NOLOCK)" also returns no records.

Thanks.

---
Jordan


Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Cannot immediately select after executing DTS - 07-14-2005 , 12:19 AM



If it returns no rows then are there rows at all?

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Jordan" <jordanm (AT) 37 (DOT) com> wrote

Quote:
"WITH (NOLOCK)" also returns no records.

Thanks.

---
Jordan




Reply With Quote
  #7  
Old   
Jordan
 
Posts: n/a

Default Re: Cannot immediately select after executing DTS - 07-14-2005 , 07:43 AM




It returns only the records previously exists in the table. Not the one
currently being inserted via DTS.

---
Jordan


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.