Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   ADO and SQL Server troubles (https://www.kinook.com/Forum/showthread.php?t=3943)

jdavidi 02-17-2009 04:09 PM

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

kinook 02-17-2009 04:31 PM

1 Attachment(s)
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.

jdavidi 02-17-2009 06:42 PM

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("ReleaseDetailID").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

kinook 02-17-2009 08:56 PM

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).

jdavidi 02-17-2009 09:21 PM

Ah, right! Thanks, that's what staring at a problem for too long helped me overlook :)


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


Copyright © 1999-2023 Kinook Software, Inc.