Solved

Two Select Statements in an ActiveX DTS script

Posted on 2004-09-17
6
258 Views
Last Modified: 2010-05-18
Hi Experts,

I use the following code in an activeX script following a select statement

          if rs.bof or rs.eof then noOrders = true
          if noOrders then
          Main = DTSTaskExecResult_Success
          End if
          if not noOrders then.... etc

My problem is that I'd like to add in another select statement further down the script and i don't want to have the message that it's been a success if the first query returns has an eof/bof....

Anyone think of a way around it?

Many Thanks
0
Comment
Question by:pjordanna
  • 4
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
Jay Toops earned 500 total points
ID: 12084174
Just take the IF noOrders then .. end if out
 
         if rs.bof or rs.eof then noOrders = true
         if not noOrders then.... etc

You can check your noOrders value at any time to set the return value
          if noOrders then
          Main = DTSTaskExecResult_Success
          End if

JAY
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12084194
I not sure I understand exactly what your asking...
could u clarify.?

JAY
0
 

Author Comment

by:pjordanna
ID: 12084239
thanks Jay yes - if i get an eof on the first select I want it to skip to the next select statement rather than returning a DTSTaskExecResult_Success
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 10

Expert Comment

by:Jay Toops
ID: 12084309
Then this is just what you want??? <Smile>

let me know if you have any problems

JAY
0
 

Author Comment

by:pjordanna
ID: 12085065
you're right of course Jay - my code is breaking else where but i'll post another question for that - thanks for your help - have a good weekend!
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12085109
you too!
JAY ..

PS.. thanks THAT grade just got me my MASTER level certificate... !!!!
http://www.experts-exchange.com/M_3415762.html

ALRIGHT!!!


0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now