Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, April 29, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 External Development Forums - SalesLogix OLEDB Provider
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: Issue with SQL Script being opened by a recordset
Ali Youssefi
Posts: 18
 
Issue with SQL Script being opened by a recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 09 9:50 AM
Hi,
I have written a script which returns the data needed. It uses table variables and int variables for looping.
This does not seem to work and I have been searching here for an answer.
I think it has to do with the variables themselves and am wondering if there is a "switch" i can flip to allow the variables to work.
In a nutshell my script does this:

declare @tbl table
insert into @tbl
loop through each record in @tbl
update record in @tbl
display @tbl

Not really a complicated script. I tried writing a simple "declare @tmp int set @tmp = 1 select @tmp" which works fine in management studio but not when i inject it into my module.
Anyway any and all help is appreciated.
Thanks,
Ali
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Issue with SQL Script being opened by a recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 09 11:39 AM
Go back to the drawing board. You cannot use TSQL like this with the SLXOLEDB provider. You need to use ADO objects to achieve what you are after. Basically:

Get a connection
Retrieve the data you wish to update into a recordset
Look throuhg the recordset and update the appropriate fields
Call Recordset.UpdateBatch()

Timmus
[Reply][Quote]
Ali Youssefi
Posts: 18
 
Re: Issue with SQL Script being opened by a recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Aug 09 7:22 AM
Thank you for the reply Timmus.
I really appreciate the fast response, you have saved me a few hours.
I am currently writing the sql logic into the module.

Thanks,
Ali
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 4/29/2024 7:53:24 AM