Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Two Select Statements in an ActiveX DTS script

Posted on 2004-09-17
6
Medium Priority
?
267 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 2000 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

885 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