Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Sql User From VB

Author  Topic 

acko
Yak Posting Veteran

52 Posts

Posted - 2003-08-04 : 10:20:20
Hi
Can anyone help me to make sql user from vb6
I've done this

Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
With cmd

.ActiveConnection = CN
.CommandType = adCmdStoredProc
.CommandText = "sp_addlogin"
.Parameters(1) = "Name"
.Parameters(2) = "password"
.Parameters(3) = "DB"
.Execute

End With
But user which is created can't access the DB database.
How can i manage permission from vb
Thanks
Alex

Andraax
Aged Yak Warrior

790 Posts

Posted - 2003-08-04 : 10:36:29
After you have created the login with sp_addlogin, you will have to give the user access to the database by executing sp_adduser.
Go to Top of Page
   

- Advertisement -