none
Create a connection to sql server based off of user selection RRS feed

  • Question

  • I am working on an WFA that will connect to a sql server based off what the user selects. Is there a sql server connection dialog component or something? I want the user to be able to select a sql server and either windows account or sql server account So like a typical sql server connection dialog box.

    Alan

    Sunday, March 25, 2018 6:16 PM

All replies

  • You could use the same dialog used in Visual Studio for making connections. In the following code sample I show how to do this.

    MSDN Code sample

    If ambitious you can alter the code to have a default server.

    I did this in the companion code sample in C#.

    Special note: This is Microsoft source so if going to use this understand the following license.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Sunday, March 25, 2018 6:48 PM
    Moderator
  • I am working on an WFA that will connect to a sql server based off what the user selects. Is there a sql server connection dialog component or something? I want the user to be able to select a sql server and either windows account or sql server account So like a typical sql server connection dialog box.

    Alan

    Normally a sql server environment cost a lot of money to maintain.

    Therefore it is rare that you will connect based on server demands for more servers. Therefore you should not use an own made program but by Microsoft supplied tool. 

     

    Success
    Cor

    Sunday, March 25, 2018 7:10 PM