Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    7

    Grin Modify Values in Registry

    How do you use variables in subkeys.
    I've tried several combinations to see if I could get the results I'm looking for and haven't had any success yet.

    setup creates DSN by Using This Code.
    ODBC.ConfigDataSource("Microsoft Access Driver (*.mdb)", "DSN=MyDSN\\0DBQ=F:\\BACKUP.mdb\\0FIL=MS Access;\\0DESCRIPTION=Questions and Answers Database\\0DRIVERID=25\\0UID=\\0\\0", ODBC_ADD_DSN);

    .........
    i want to give DSN Name @ run time by using %SomeVariable%
    i want to give Database File Path @ run time by using %someVariable%.

    like this...
    ODBC.ConfigDataSource("Microsoft Access Driver (*.mdb)", "DSN=%DSN_NAME%\\0DBQ=%File_Path%\\0FIL=MS Access;\\0DESCRIPTION=Questions and Answers Database\\0DRIVERID=25\\0UID=\\0\\0", ODBC_ADD_DSN);


    or if anyother way or Example someone have.
    ThanxXx! in Advance!
    Bilal Ahmed

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    Use SessionVar.Expand:

    Code:
    ODBC.ConfigDataSource("Microsoft Access Driver (*.mdb)", SessionVar.Expand("DSN=%DSN_NAME%\\0DBQ=%File_Path%\\0FIL=MS Access;\\0DESCRIPTION=Questions and Answers Database\\0DRIVERID=25\\0UID=\\0\\0"), ODBC_ADD_DSN);

  3. #3
    Join Date
    Mar 2007
    Posts
    7
    Quote Originally Posted by Brett View Post
    Use SessionVar.Expand:

    Code:
    ODBC.ConfigDataSource("Microsoft Access Driver (*.mdb)", SessionVar.Expand("DSN=%DSN_NAME%\\0DBQ=%File_Path%\\0FIL=MS Access;\\0DESCRIPTION=Questions and Answers Database\\0DRIVERID=25\\0UID=\\0\\0"), ODBC_ADD_DSN);
    ThanxXx! Brett, no-doubt am learning very fast,it works FINE!... thanXxX again.
    now lemme ask another Question, am newbie!
    a printscreen image is attached, User information! but when i click on Browse image, nothin happen... even am using code below in Actions > On Ctrl Message...

    Code:
    if (e_MsgID == MSGID_CLICKED) then
    	-- a control was clicked...
    
    	if (e_CtrlID == CTRL_BUTTON_01) then
    		result = Dialog.FileBrowse(true, "Load File", _DesktopFolder, "Microsoft Access File (*.mdb)|*.mdb", "", "", false, true);
    
    		-- If CANCEL was not chosen, then let's get the file path
    		if (result[1] ~= "CANCEL") then
        		Dialog.Message("You chose the following file", result[1]);
       		end
    	end
    end

    now lemme knw where am doing mistake or getting value by wrong method ?
    even same code works perfect when i used Buttons Screen.
    nd now here it iz not working...
    Attached Images

Similar Threads

  1. Why Doesn't Modify Registry work????
    By linhardt in forum Setup Factory 6.0
    Replies: 1
    Last Post: 06-28-2006, 03:50 PM
  2. Cannot write Registry values
    By Lefteris in forum Setup Factory 7.0
    Replies: 6
    Last Post: 04-12-2005, 04:40 AM
  3. INFO: Finding Shell Folders in the Registry
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-10-2002, 03:52 PM
  4. Using Modify Registry
    By stephpeck in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 11-15-2000, 03:43 AM

Posting Permissions

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