sql-server – INSERT权限被拒绝对象’employee_info’,数据库’
发布时间:2020-12-12 08:41:43 所属栏目:MsSql教程 来源:网络整理
导读:Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click Dim myconnection As SqlConnection Dim mycommand As SqlCommand Dim ra As Integer myconnection = New SqlConnection("server=IAI-004;uid
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click Dim myconnection As SqlConnection Dim mycommand As SqlCommand Dim ra As Integer myconnection = New SqlConnection("server=IAI-004;uid=;pwd=;database=payroll") myconnection.Open() mycommand = New SqlCommand("INSERT INTO employee_info([employee_id],[first_name],[last_name],[middle_name],[email],[telephone],[gender],[status],[date_birth],[hire_date]) values ('" & Employee_idTextBox.Text & "','" & First_nameTextBox.Text & "','" & Last_nameTextBox.Text & "','" & Middle_nameTextBox.Text & "','" & EmailTextBox.Text & "','" & TelephoneTextBox.Text & "','" & GenderTextBox.Text & "','" & StatusTextBox.Text & "','" & Date_birthDateTimePicker.Text & "','" & Hire_dateDateTimePicker.Text & "')",myconnection) mycommand.ExecuteNonQuery() MessageBox.Show("New Row Inserted" & ra) myconnection.Close() End Sub 对象“employee_info”,数据库“工资单”模式dbo上的INSERT权限被拒绝 我如何解决这个问题? 解决方法您需要在SQL Server(SSMS)中执行此操作(大概).右键单击SQL Server中的表,并向用户提供INSERT权限. (……) >右键单击表 BTW – 你可以直接通过TSQL这样做,但是如果你现在有这个问题(你提到你是新的),那么可以先从GUI开始. 另外 – 这假设您有权在SSMS中执行此操作.如果你不是DBA / DBO,那么你可能需要联系某人… (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 测试 – 在等待构建/测试/数据库迁移运行时,我该怎么办?
- sql – 查找Hive中一个月的最后一天
- 使用Sybase SQL Anywhere拆分/爆炸逗号分隔的字符串
- SQL Server无法生成FRunCM线程的解决方法
- SqlServer存储过程分页:大数据量分页存储过程效率测试附代
- sql-server – 我可以从SQL Server默认获得哪些事件信息?
- sql-server-2008 – 如何在Sql Server 2008上终止/终止所有
- 本地计算机上的SQLSERVERAGENT 服务启动后又停止了
- sql – 如何通过rails迁移设置Postgres中主键(ID)列的起始点
- SQL Server 使用 GUID 值来作为数据库行标识讲解