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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Authentication with VB.Net?

Status
Not open for further replies.

lori604

MIS
Dec 30, 2003
1
CA
Help! I need to make a login form that will do password authentication against a SQL Server database AND have a combo box that gets populated with all the database names in the System DSN. I have no clue how to do this. Can anyone please help??
 
lori,

This is quite a bit of code to put in as a post here.

You say >>> "I have no clue how to do this"

Do you not know how to

1.Connect to a database
2.Write Sql statements
3.fill a dropdown etc...

What part are you getting stuck on. We are here to help you get past roadblocks. Let see what you have so far.

DotNetDoc
M.C.S.D.
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
Hi Lori
1) To do a password authentication you can make your own table in which you can store user name & password and then connect to the databse you select from the combobox
2) To get names of database populated in combobox
use System SP
sp_databases
Once you have the User Name,Password and the databse name you want to connect then you can connect easily with the Connection object like
Dim objMainConnection As New OleDb.OleDbConnection()
objMainConnection.ConnectionString ="Your connection String"
.....

Regards
Nouman

Nouman Zaheer
Software Engineer
MSR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top