Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, August 24, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: How to minimize the form with reference to button click
Harendra Sinha
Posts: 66
 
How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Aug 08 12:03 PM
Hi guys,
I want to run a SQL SERVER Stored Procedure in background , that means , when I click on a button it will exceute the Stored Procedure in the background and I should be able to close or minimize the form. Since the SP ia takeing a long time (about 10-15 minutes) I don't want that form to be opened for that period of time.
Is this possible ?? Suggest any solution.

Thanks in advance.
Harendra
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 08 12:24 AM
In order to execute something asynchronously, you'll have to shell out to it. Can't do it in the SLX scripting environment. I'd build it as a .NET extension, or even just an exe that you'd kick off when needed.

-Ryan
[Reply][Quote]
Harendra Sinha
Posts: 66
 
Re: How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 08 7:43 AM
Thanks Ryan
You are right , I have tried with SLX scripting , no luck . But I don't want to go with .Net route either , because I have to bundle .Net framework with SLX bundle .

I am looking for other alternative.

-Harendra
[Reply][Quote]
Jim
Posts: 8
 
Re: How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 08 7:55 AM
You can go with VB 6.0. The coding is basically the same and the requirements needed to run the exe are typically installed already on Windows. You still take a chance of a dll or ocx not being present though.

You can also use SQL server to do this. Create a table where you can insert a row that acts as a request to do a job. Then create a program or DTS package that you can schedule to run and check for rows in this table. Let's say you poll for it every 30 seconds. When the new row is found the job can run your sproc.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 08 11:51 AM
What version of SLX? SLX v7 and higher will install the .NET 2.0 framework for you so you'll only need to install the framework if you're on a version prior to 7.

Another option would be to write out a VBS file and then run that async from slx? Or have it run as a server side process (flag something in SLX that triggers the operation to run async on the server).
[Reply][Quote]
Harendra Sinha
Posts: 66
 
Re: How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 08 12:13 PM
Ryan,
Have taken note of your suggestions . But .Net route have many issues and limitations for my project(not general issues). (FYI .. I am using SLX version 7.2 )
My Database team have optimized the Store Procedure and now it is taking 4-5 minutes and that is something acceptable for the client .For that period of time , I am displaying a message that ... some process is going on .. please wait . that'fine for time being and the end user can wait till the completion.

I was also trying to use progress bar on timer event but it won't work becoz SP event won't allow other thread to run in parallel.

Thanks
-Harendra
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: How to minimize the form with reference to button clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Aug 08 10:22 PM
I have never tried this, and it seems a bit convoluted, but maybe it's worth a try.

First create a DTS package that runs the SP.

Then in your code, shell out in WScript, setting 'WaitOnReturn' to false.

See (http://msdn.microsoft.com/en-us/library/d5fk67ky.aspx) for WScript help

Your Wscript, of course, executes DTSRun to run the package you created.

Hmm, thinking about this, you could probably use iSQL too and run the SP directly.

Your big issue is security - both of these methods would require the SQL Server login credentials to be exposed to the user (I think).

Phil
[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 © 2025 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): 8/24/2025 6:23:15 PM