Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Login

Status
Not open for further replies.

cschristian78

Technical User
Nov 3, 2004
23
0
0
US
I am building an application that requries the user to login to one specified instanct of sql server. I am using VB.net to create the application. What I want to have is a login that allows the user to select one of many possible instances of sql server on his/her machine or across a network. Then enter an userid, password and refreshes all databases that are attached to that instance of sql server. I have it working by defaulting the server name to (local), userid to sa and a blank password. Is there a default set of code that i can use in the vb program that allows more user interaction?

Thanks

Scott
 
Well, I suppose I would create a form asking the user what instance he wanted to log into and then build the connection string in the application based on what he selects.

BTW, you should never use sa with a blank password or give users the same administrative rights that someone with sa has. This is a very poor practice and can result in unintended changes to your database and allows hackers easy access.

Questions about posting. See faq183-874
Click here to learn Ways to help with Tsunami Relief
 
Thanks for the reply. I understand and have what you described working (but only for local installations). My question comes in when running a query selecting all of the available servers. For example, when clicking the dropdown on the service manager, it shows all servers that are availabe (without typing). The user is then able to select the instance and then query any database that is attached. I would like to take the "human" side of typing the servername by populating a list for all servers across a network. This will allow them to run queries on different machines where a specific database may be stored. I can do what I need when using the local server so that shouldn't be an issue.

Any thoughts?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top