Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-17-2009, 05:09 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
ADO and SQL Server troubles

Howdy!

Loving v7; was attempting to utilize ADO actions for the first time in concert with the new Loop action. My query is going against a SQL Server (2000) database.

ADO query is Select ReleaseID from Release

The loop action type is ADO Recordset, and I provided %ADO_RS% as the macro.

The query seems to work, as LOOP_COUNT is equal to what I expect, however I can't seem to retrive any of the values.

In the substep of the loop, I tried a simple run script action using the syntax from the Server.bld sample file to try to MsgBox [vbld_TempMacroObj("LOOP_VALUE").Fields("ReleaseID" ).Value]
but it returns empty.

The sample.bld works fine with the Access database, but is the syntax for data retrival different with a SQL Server provider?

Thanks!

--jdavidi
Reply With Quote
  #2  
Old 02-17-2009, 05:31 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
I did a SELECT test here using the ADO and Loop actions with SQL Server 2000, and it works as expected (see attached sample and log). Not sure what might be different for you.
Attached Files
File Type: zip sql_ado.zip (1.2 KB, 1695 views)
Reply With Quote
  #3  
Old 02-17-2009, 07:42 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Huh...so yours works, and I substituted my script-action MsgBox step with a logging step...and that works. As did the rest of my logic that writes out values to a text file and proceeds with the rest of my build as intended.

So I guess what threw me into thinking I goofed somewhere is that I can't get MsgBox to return what I thought was be a simple string (or in my case an int value.) I threw CStr around the [vbld_TempMacroObj("LOOP_VALUE").Fields("ReleaseDet ailID").Value] logic but it still returns empty.

Odd, but I'm glad it's not impairing my end goal. Thanks a ton; can you think of any reason it won't display from a MsgBox call though?

--jdavidi
Reply With Quote
  #4  
Old 02-17-2009, 09:56 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Within a Run Script step, drop the square brackets (that indicates a script expression in other fields, but everything is already script in the Run Script action).
Reply With Quote
  #5  
Old 02-17-2009, 10:21 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Ah, right! Thanks, that's what staring at a problem for too long helped me overlook
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 02:59 AM.


Copyright © 1999-2023 Kinook Software, Inc.