1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

vb.net and sql server help

Discussion in 'SQL Server' started by rockyy, Feb 7, 2010.

  1. rockyy

    rockyy New Member

    Vb.net and sql server help…?
    My application (exe) is made
    Using .net (vb.net)
    And Backend-sql sever
    After making it into package and my client install it into his pc
    See pic here-\ the computer name I m talking about

    Suppose my client machine name is-hcl
    And I already made all connections string with hcl\\sqlexpress using windows authentication in app.config
    And after sometime he formats his pc and changed his pc name to= hcl-2 ??
    Now the problem
    Is there any way to get the new system name ???? to make connections
    bcuz its not worth it to always making a new exe and giving it to him when he formats his pc???
     

    Attached Files:

  2. LynxSI

    LynxSI New Member

    If you have the skills to create a successfull client/server database application, I would think this should be easy for you!

    You can store your database connection string in a hundred different places. You could use the windows registry, an ini file, an XML file or .net's builtin applicaiton serialization stuff. The only important part is to make sure you protect your server credentials if the password is to be stored (it should be safe to store only the server path unencrypted).

    I myself choose to store an application XML file in the windows "application data" folder as this conforms to Microsoft's best practices. I do not store the user credentials. I only store the server and database connection information. The user is prompted to login when they run the application.

    Good luck in your learning!
    - Ben
     

Share This Page