August 20, 2010 at 7:07 am
Hi friends,
I'm creating an application role, the password for the role should be read from a table. Is it possible to do this?
The table need to be read is roleconnect has following fields:
name role_pwd1 role_pwd2
----------------------------------------------
test 'First password' 'Second Password'
Create application role [from roleconnect.name] with password= ' length of roleconnect.name + first two chars of role_pwd1+ 4rd to 8th chars of role_pwd2 + total length of (role_pwd1+role_pwd2) '
It should be like:
create application role test with password = '4Fiond P29'
I need to script this somehow I'm looking for help how I can do this..Is it possible to create this using a stored procedure? Please give me your suggestions
Thanks so much
August 20, 2010 at 11:21 am
newbieuser (8/20/2010)
Hi friends,I'm creating an application role, the password for the role should be read from a table. Is it possible to do this?
The table need to be read is roleconnect has following fields:
name role_pwd1 role_pwd2
----------------------------------------------
test 'First password' 'Second Password'
Create application role [from roleconnect.name] with password= ' length of roleconnect.name + first two chars of role_pwd1+ 4rd to 8th chars of role_pwd2 + total length of (role_pwd1+role_pwd2) '
It should be like:
create application role test with password = '4Fiond P29'
I need to script this somehow I'm looking for help how I can do this..Is it possible to create this using a stored procedure? Please give me your suggestions
Thanks so much
since an application would be doing the work, why don't you use .ExecuteNonQuery for your dataadapter or SQL Helper?
Dim ThePassword as String = [someFormula to make the password]
Dim sql As String
sql = " create application role test with password = '" & ThePassword & "'"
'--SQLHelper Class from Microsoft Data Access Application Block
'http://www.microsoft.com/downloads/details.aspx?familyid=f63d1f0a-9877-4a7b-88ec-0426b48df275&displaylang=en
SqlHelper.ExecuteNonQuery(Me.ConnectionString, CommandType.Text, sql)
Lowell
August 25, 2010 at 9:18 am
Thanks Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply