Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get SQL result via ActiveX Script

Status
Not open for further replies.

ohmbru2

Technical User
Jul 24, 2001
51
US
Can ActiveXScript return a value from a SQL select statment such as a records count?

If so, how can I do this?

 
You don't need to use ActiveX, you just need to set up Global Variable and use it as an output parameter for an execute SQL task.

In your case, you'd place your select query in the SQL task, click parameters, go to output parameters, and select Rowset. Then choose the Global Variable you would like to assign your rowset to from the drop down menu.

Hope this helps,

Alex

Professor: But what about your superintelligence?
Gunther: When I had that there was too much pressure to use it. All I want out of life is to be a monkey of moderate intelligence who wears a suit. That's why I've decided to transfer to Business School.
Professor: NOOOOOOOOOOOO.
 
The reason I want to return a value is so I can create a loop. I need to reprocess an SQL step until the result set is zero.

maybe this is the wrong approach.

 
If you include the SQL Step both at the start (outside loop) and at the end (inside loop) I would think you could do it. What exactly are you trying to accomplish with your loop?

Professor: But what about your superintelligence?
Gunther: When I had that there was too much pressure to use it. All I want out of life is to be a monkey of moderate intelligence who wears a suit. That's why I've decided to transfer to Business School.
Professor: NOOOOOOOOOOOO.
 
I figured out how to do what I want. I developed a series of SQL statements to isolate duplicate records, delete them, and add only the record I want back to the original file.

I used WHILE in an SQL task.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top