I have found the answer:
EXEC ('CREATE LOGIN [domain\username] FROM WINDOWS WITH DEFAULT_DATABASE=[databasename];')
EXEC ('CREATE USER [domain\username] FOR LOGIN [domain\username] WITH DEFAULT_SCHEMA=[dbo];')
EXEC sp_addrolemember N'sqlrolename', N'domain\username'
Hi all,
Is there a way to dynamically create SQL users?
I am working on an ASP.NET web application and am using a modified version of the stored procedure which adds users to the aspnet roles database.
You can pass in comma separated lists of domain usernames and roles as parameters and it...
Hi,
I have a problem using the VB6 ListView control in a Citrix environment. The checkboxes are displayed the wrong size. They are too large and therefore make the height of each row bigger than it should be. Switching the checkbox property on & off dynamically, toggles the rows between to the...
Hi,
I am new to .NET. I am using VB and have a dataset with 6 tables in it. A child table of the primary table has parameters set on it. This is set by a userform. When the user chooses dates, the relevant table is filtered, but the other tables still display all the original data. How do I...
Thanks for replying so quickly. I thought about that. The thing is I don't want to prevent people from customising the Standard Toolbar just for the sake of one button. The users wouldn't be happy with that. And you cannot apply protection to the button itself.
It also appears that there are no...
Hi,
I have created an Outlook COM addin that adds a CommandBarButton to the 'Standard' toolbar to run a custom for.
I declared it as a control WithEvents. The problem is if a user copies or moves the control to another toolbar the Click event no longer fires.
It does not seem possible to...
I spoke too soon. It does not work as users would need Admin rights for this script to run. Bit of an oversite by me!
I have seen scripts to automate the RunAs.exe. I cannot do this as it would mean the Admin password would be hard coded into the script.
Any other ideas?
I have doubled this...
I spoke too soon. It does not work as users would need Admin rights for this script to run. Bit of an oversite by me!
I have seen scripts to automate the RunAs.exe. I cannot do this as it would mean the Admin password would be hard coded into the script.
Any other ideas?
Thanks for replying, but we have tried, and not managed to do that. There is a default user template which when a new user logs in to the PC they get their settings copied from this profile. We have managed to get as far as having the add-in in the correct folder:
UserFolder$\Documents And...
Hello,
Not sure if this is the right forum for this.
We are migrating from Novell Groupwise to Outlook 2003. We have over 1000 pc's to do, which are having standard images put on them.
I have created a Phone Message form as an add-in. Is there an easy way to set the default Com Add-ins for...
Hello,
Not sure if this is the right forum for this.
We are migrating from Novell Groupwise to Outlook 2003. We have over 1000 pc's to do, which are having standard images put on them.
I have created a Phone Message form as an add-in. Is there an easy way to set the default Com Add-ins for...
Hi,
Thanks for your responses.
Rick I have managed to get as far as trying to set the 'compile with COM interop' option. Cannot find where this is - it is not an option on the Build Menu. I am new to .NET so I may be missing something glaringly obvious.
Can you give me a bit more info...
Hi all,
Not sure if this is a silly question, but is there any way to use .NET controls in Access?
I would like to use the .NET version of the ListView control in Access 2003, so I can use the improved features. (ie: different coloured ListItems).
I have not found any info on this and was...
Glad you sorted it.
What I do to allow users to customise forms is, I use system colours for everything. This way the forms will take on the colour scheme of the users Windows Theme. I know this isn't what you want in this case but it works quite well and allows users to totally customise the...
Hi,
Try this code in a global module:
Function ChangeFormColours(strFormName As String)
Dim ctlX As Control
Dim frm As Form
Set frm = Forms(strFormName)
With frm
.FormHeader.BackColor = GlbHeaderBackColour
.FormFooter.BackColor = GlbHeaderBackColour...
Hi,
If the listbox is already full you need to use the ListItems Collection to choose the first record:
ListBox1.ListItems(1).Selected = True
Change ListBox1 to the name of your control.
Hope this helps,
Dean :-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.