Solved

Two Select Statements in an ActiveX DTS script

Posted on 2004-09-17
6
263 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

752 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