473,396 Members | 1,832 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,396 software developers and data experts.

MSSQL Insert Permissions

1
I am having what I believe to be permissions problems with my database. My company has one database that has already been designed and works fine. I have tried to create a new database using the same user to login and work with it.

The problem is that the INSERT commands do not work. It doesn't give an error, so much as when this code is executed:

rows = cmd.ExecuteNonQuery();

There are no rows updated, even though it should be inserting.

UPDATE, SELECT, and DELETE commands work fine. Is it a permission problem? If so, what do I need to do to fix it? Or, do I have to create a new user for the second database? If that is the case, I would need help with that too, because I tried doing that but I couldn't get that to work either.

Any help would be greatly appreciated.
Jun 11 '07 #1
1 1757
nomad
664 Expert 512MB
I am having what I believe to be permissions problems with my database. My company has one database that has already been designed and works fine. I have tried to create a new database using the same user to login and work with it.

The problem is that the INSERT commands do not work. It doesn't give an error, so much as when this code is executed:

rows = cmd.ExecuteNonQuery();

There are no rows updated, even though it should be inserting.

UPDATE, SELECT, and DELETE commands work fine. Is it a permission problem? If so, what do I need to do to fix it? Or, do I have to create a new user for the second database? If that is the case, I would need help with that too, because I tried doing that but I couldn't get that to work either.

Any help would be greatly appreciated.
You might be able to do it yourself esp if you do not have Grant privileges on the system...
try this
GRANT privileges (privileges is can be select, insert but you want ALL)
on databasename.tablename (you can do this too database.* which gives you acess to all the tables.)
TO username
IDENTIFIED by "password";

nomad

nomad
Jun 11 '07 #2

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

Similar topics

5
by: Alper Adatoz | last post by:
Hi, i have a little problem. i hope u guys give me a clear solution (: db: mssql i just want to put jpeg file to the image field at the mssql db. and after that i want to call it back..
3
by: francisl | last post by:
We have to build some script were I work to make a dynamic server inventory. But, the project team, a windows crew, start it all in vbscript and on mssql. Note, due to political reason, we can...
14
by: Andre | last post by:
Hello Can anyone help me translate this from access so that it can work in mssql (i need to get next value, but cannot use identity as if row is deleted, another must get new next column number...
11
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach ...
3
by: Robert Johnson | last post by:
Hi all. My datasource is a MSSQL 2005 database with several tables all visable in my datasources tab. I can preview data in the Designer OK so my connection is fine. Now, I add a form, drag from...
5
by: eisenstein | last post by:
i read out an utf-8 xml file with greek or russian/cyrillic characters. i can display it in the browser but if i insert data into an mssql database -field is nvarchar(4000)- i only see ??? or...
4
by: ThePhenix | last post by:
Hi everybody, I have recently been doing a conversion for my boss for a access 2000 database (both front and backend) to a MSSQL backend. I finished the conversion today (as quite a lot of the...
3
by: Shawn Beasley | last post by:
Hi List, I am searching franticly for a solution (or the procedure) to setting the coding of a new DB to UTF-8. I can find no setting in the Server Manager, during creation of the DB, to...
0
by: chromis | last post by:
Hi, I've recently been porting a little php / mysql script over to asp / mssql and I've got issues with the timestamp data type. With mysql i could easily insert 01:01:01 into the timestamp...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.