Results 1 to 2 of 2

Thread: Registry help required !

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    Hyd - INDIA
    Posts
    57

    Unhappy

    Hello there., below are few registry queries which i hope will be answered. I have the below reg file created which has the odbc info related to my application. This odbc info is required for my reports to run. I have to manually execute this reg file so that info is added to the registry. I tried executing by using shellexecute from vb to write this info, but each time i execute this it prompts me asking "do you want to add this info to registry". I dont want this to happen.

    So my 1st question related to this is how do i write the below piece of info to the registry from VB.

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\aicis reports]
    "Driver"="C:\\WINNT\\System32\\sqlsrv32.dll"
    "Server"="BOMBDC06"
    "Database"="HYD"
    "Language"="us_english"
    "LastUser"="sa"

    ** Secondly i would be accessing different servers and db's located on them. So instead of writing the whole info into the registry can i write only the server and database info. The info should appropriately be written based upon the user selection of the server and database. I have two textboxes which will allow the
    user to enter the servername and db name. Can you guys pl give me some code for both the queries please.

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    You don't need to use .reg files to insert into the registry. A VB app could do it for you without the "Are you sure" prompts. Check out this thread.

Posting Permissions

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



Click Here to Expand Forum to Full Width