将记录从数据表插入到SQL表时发生超时过期错误 [英] timeout expired error while inserting records from datatable to sql table

查看:202
本文介绍了将记录从数据表插入到SQL表时发生超时过期错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在将数据表传递给存储过程.

数据表中的记录将插入到sql表中.

但是在建立连接并将datatable参数传递给存储过程并尝试将数据推入sql表后,它将引发超时过期错误.

即使50条记录也会引发错误.

环境-vs 2005和sql server 2008


i am passing a datatable to a stored procedure.

the records from the datatable are inserted into the sql table.

but after establishing connection and passing the datatable parameter to the stored procedure and trying to push the data into the sql table it throws timeout expired error.

it throws error even for 50 records.

environment - vs 2005 and sql server 2008

推荐答案

检查您的连接超时.我认为默认设置为30秒,

选中此一项
check your connection TimeOut. I think the default is set to 30 sec,

check this one out


您确定连接成功吗?有时,尝试连接时会发生超时.
Are you sure the connection was successful? Sometimes, timeouts will occur when attempting to connect.


检查以下内容:

如果页面过期,则web.config文件中的sessionstate timeout ="600"或更大的值.

连接/命令对象超时-如果命令执行过期

也可以在连接字符串中使用超时.
Check the follwing:

sessionstate timeout="600" or greater.. in web.config file if page gets expired
or
Connection/Command object timeout - If command execution gets expired
or
Can use timeout in connection string also.


这篇关于将记录从数据表插入到SQL表时发生超时过期错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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