Results 1 to 2 of 2

Thread: question.

  1. #1
    Join Date
    Dec 1969

    Default question.

    Hello, I know this is probably bad practice, but I really need to do it in my case.<BR>What I want to do I use a dynamicly created variable in the following line:<BR><BR>sql = "SELECT * FROM table WHERE ID = "&ProfileID<BR><BR> the end, I wish to use a dynamicly created variable. "ProfileID" can be "PageID" or "CalendarID" depending on how the Sub is called. I tried<BR>eval(component&"ID")[ but I don&#039;t get a value. I need it dynamic because I might use this sub later on for other types of data that I haven&#039;t bult yet. How is this accomplished?<BR>thx<BR>~~Chaotix

  2. #2
    Join Date
    Dec 1969

    Default RE: question.

    I hope I understand you correctly.<BR><BR>You can have a local/global variable eg intID<BR>use this in your sql<BR><BR>sql = "SELECT * FROM table WHERE ID = " & intID<BR><BR>and in your subs or whereever you decide to use profileid or pageid set intId with that value<BR>eg intID = ProfileId or intID = PageId<BR><BR>And I am not sure but i think the VBScript Eval works differently than the javascript eval (which probably you are trying to do)

Posting Permissions

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