C#中Win形式的sql程序 [英] sql program in win form in c#

查看:66
本文介绍了C#中Win形式的sql程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我是新手程序员,我写了一个程序,我的程序连接到数据库
连接字符串,但在我的程序中出现此错误

对对象表名",数据库数据库名",模式"dbo"的INSERT权限被拒绝.
如何获得数据库访问表的权限?
我是否更改代码或数据库以解决此问题?

Hi all
I am beginner programmer I write a program and my program connect to the data base
with connection string but in my program appearance this error

The INSERT permission was denied on the object ''table name'', database ''database name '', schema ''dbo''.
How to get permission to access table in data base ?
Do I change my code or my data base to solve this problem?

推荐答案

您好,

您必须在数据库系统中更改权限.
与您连接的用户没有更改,更新,...数据的权限.
Hi,

you must change the permissions in the database-system.
The user you connect with, havent the permissions to change, update, ... the data.


1)转到您的数据库,然后在表上单击鼠标右键.
2)选择属性,然后会出现一个小窗口
3)从右侧选择权限
4)选择用户/角色"并通过选中复选框进行访问.
1) Go to your database and right click on the table.
2) Select properties then a small window will appear
3) Select Permission from the right side
4) Select the User/Role and give the access by checking the checkbox.


这听起来很傻,但是您是否有一个名为表名"的表和一个名为如果您可以的话,请输入数据库名称".但是对我来说,听起来好像您的命名不正确.您能发布您的连接字符串吗?
This may sound silly, but have you got a table called ''table name'' and a database called ''database name'' if you have fine. But to me sounds like you haven''t named them properly. Could you post your connection string please?


这篇关于C#中Win形式的sql程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆