Guidance...dynamically generate code?

Results 1 to 2 of 2

Thread: Guidance...dynamically generate code?

  1. #1
    Join Date
    Dec 1969

    Default Guidance...dynamically generate code?

    Hi all..I&#039;m going to try and be concise in my explanation...<BR>I need to generate a front end that will allow a user to create IF-THEN statements...The statements may need to be nested IF-THEN statements, so I would need to be able to facilitate this. <BR><BR>In short, I created a program that runs a query on a remote db to see if there are results. If there are results, the results are emailed to appropriate parties. I need the user to be able to go to a front end build conditions such as...(everything I envision in a drop down is in &#124&#039;s )<BR><BR>IF &#124Columns&#124 CONTAINS "Windows" THEN &#124Send Email to&#124 &#124People&#124<BR><BR>Not sure if that made sense, so please let me know if I can elaborate...Anyone done anythin simliar before? ANy ideas appreaciated

  2. #2
    Join Date
    Dec 1969

    Default Ugly approach...

    With your approach, you&#039;ll have to get all the records from the DB and then filter them, one at a really slow and tedious time, in your VBS code.<BR><BR>I think that, instead, you should use the selections to create the WHERE clause of a SQL statement, so that you will *ONLY* get the records that match the users choice. And then the VBS code simply emails any records that match.<BR><BR>So if the GUI shows<BR> &#124Columns 1 through 3&#124 CONTAINS "Windows" <BR>you generate a part of a WHERE clause that looks like<BR> WHERE<BR> ( column1 LIKE &#039;%Windows%&#039; OR column2 LIKE &#039;%Windows%&#039; OR column3 LIKE &#039;%Windows%&#039; )<BR><BR>And you continue to build up the WHERE clause in that manner.<BR><BR>etc.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts