Solved

Two Select Statements in an ActiveX DTS script

Posted on 2004-09-17
6
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

627 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