使用SQL Server 2008在ASP.NET C#中使用Excel文件更新详细信息 [英] update details using excel file in asp.net C# with sql server 2008

查看:108
本文介绍了使用SQL Server 2008在ASP.NET C#中使用Excel文件更新详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上工作.它具有页面``UpdateRegisterNo.aspx''.在此页面中,我需要使用excel文件更新学生注册号.在excel文件中包含admision nuber注册号.但它不能在服务器上工作.我遇到了错误


错误是

I working on website. it have page ''UpdateRegisterNo.aspx''. in this page i need to update student registration number using excel file. in excel file contains admision nuber registration number. but it can''t work in server. i got an error


The error is

User does not have permission to perform this action.
You do not have permission to run the RECONFIGURE statement.
The configuration option 'Ad Hoc Distributed Queries' does not exist, or it may be an advanced option.
You do not have permission to run the RECONFIGURE statement.


请帮助我


please help me

推荐答案

在asp.net编程中使用的sqlserver用户没有执行RECONFIGURE语句的权限.
创建一个新用户,使用新用户登录并在asp.net中使用它.

使用以下代码段创建新用户

sqlserver user which is used in asp.net programming is not having the permission to execute the RECONFIGURE statement.

create a new user, login with the new user and use it in asp.net.

use the following snippet to create new user

use master;
go
drop login TestUser;
go
create login TestUser with password = '';

USE <yourdatabase>;
drop user TestUser;
create user TestUser for login TestUser with default_schema = dbo;
go
setuser 'TestUser'
go

exec sp_configure 'allow updates', 1
RECONFIGURE
go
setuser
</yourdatabase>


这篇关于使用SQL Server 2008在ASP.NET C#中使用Excel文件更新详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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