473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

mapping error

dear all

I got the follwoing error while trying to create database user

The role ''db_owner'' does not exist in the current database.
Changed database context to 'try2'.

here the code

[code]
string query = string.Format("CREATE DATABASE [{0}]", textBox5.Text.ToString());
string query1 = string.Format(" CREATE LOGIN [{0}] WITH PASSWORD = '{1}' , CHECK_EXPIRATION=ON, CHECK_POLICY=ON ", textBox6.Text.ToString(), textBox7.Text.ToString());
string query2 = string.Format(" USE [{0}] CREATE USER [{1}] for LOGIN [{1}]", textBox5.Text.ToString(), textBox6.Text.ToString());
string query3 = string.Format("USE [{0}]; exec sp_addrolemember ['db_owner'], ['{1}'];", textBox5.Text.ToString(), textBox6.Text.ToString());
[\CODE]

Any ideas?
Mar 25 '09 #1
0 1043

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Pierre Fortin | last post by:
Hi! "Python Essential Reference" - 2nd Ed, on P. 47 states that a string format can include "*" for a field width (no restrictions noted); yet... >>> "%*d" % (6,2) # works as expected ' ...
8
by: Steven Bethard | last post by:
I tried to Google for past discussion on this topic, but without much luck. If this has been discussed before, I'd be grateful for a pointer. Does anyone know why you can't assign a custom...
0
by: Chris | last post by:
I am using Castor to marshal and unmharshal some objects. I have an object that has a List of strings. I can marshal it without using a mapping file. However, when I try to unmarshal it without...
3
by: Evan Smith | last post by:
I have a federated database (7.2 FP11, AIX 4.3) that seems to work fine in most aspects. Today I'm trying to add a new user mapping with the following statement: create user mapping for mngdrq01...
0
by: aj | last post by:
DB2 WSE LUW 8.1 Fixpak 5 Red Hat AS 2.1 I'm trying to set up a federated view from one DB2 database to another in the same instance on the same server. I do a: create server <SERVER> type...
2
by: Tomas Vera | last post by:
Hello All, I have a web application that is required to copy a file from the WebServer to a remote web server (staging server to production server). I've created an application that maps the...
0
by: Thomas | last post by:
in .net 1.1 we successfully use a HttpModule to catch 404 / 403.1 html errors. after migrating to .net 2.0, this modules is broken in a very, very strange way. we have defined a wildcard...
1
by: ronrsr | last post by:
what is python trying to tell me here? does it have to do with formatting the string. Keywords and Zinger are fields in my database. print """<tr> <td class="padplace"...
0
by: fndjoum | last post by:
When using Visual Studio 2005, I was able to read the text file if it's in my local c:\ drive ifstream myfile; myfile.open("C:\\test.txt"); --------------> this works on local drive ...
1
by: puer_apuliae | last post by:
- Federation Server (DB2) - Solaris 10 Fed Server db2 "create user mapping for USER123 server SRV1 options (remote_authid ‘AAA_USER’, remote_password ‘PWD’)" CLP response: # ./db2...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.