求解!DbDataadapter.Fill调用这个方法时报超时

问题描述

publicDataSetExecuteQuery(stringstrCmd,stringtableName){DataSetdataSet=newDataSet();try{IDbCommandcommand=CreateCommand(strCmd,connection);//读取数据命令command.Transaction=transaction;DbDataAdapterdataAdapter=CreateDataAdapter(command);//读取数据接口dataAdapter.Fill(dataSet,tableName);//填充数据到数据集}catch(ExceptionSelectException){this.connection=null;throwSelectException;//传递错误信息}returndataSet;}strCmd手工执行了是有数据的,也就7,8十行数据,tableName表名是正确的,但是执行到dataAdapter.Fill(dataSet,tableName);就报超时了,哪位大神给找找原因啊

解决方案

解决方案二:
command.Transaction=transaction;去掉.
解决方案三:
该回复于2014-01-14 22:59:00被版主删除
解决方案四:
command.Transaction=transaction;不知道你写事务做啥。。写了但又没有见你的BEGIN和COMMIT或ROLLBACK的代码。。或者这个是导致超时的原因吧
解决方案五:
1ExecuteQuery(stringstrCmd,stringtableName)不懂你传的是什么参数进来2有可能是数据库没有链接上
解决方案六:
3command有一个执行超时,可以设置长一些

时间: 2024-09-17 03:52:54

求解!DbDataadapter.Fill调用这个方法时报超时的相关文章

quartz2.1.5 调用 scheduler.start()方法时报异常

问题描述 quartz2.1.5 调用 scheduler.start()方法时报这样一个异常:严重: An error occurred while scanning for the next triggers to fire.org.quartz.JobPersistenceException: Couldn't acquire next trigger: You have an error in your SQL syntax; check the manual that correspo

lotus6.5调用JAVA方法出错求解

问题描述 DimmySessionAsJavaSessionDimmyClassAsJavaClassDimOptWebServiceAsJavaObject,a,b,cAsIntegerSetmySession=NewJavaSession()SetmyClass=mySession.GetClass("OptWebService")SetOptWebService=myClass.CreateObject()OptWebService.Send("120307049&qu

jax ro-关于AjaxPro调用后台方法,前台js都不执行

问题描述 关于AjaxPro调用后台方法,前台js都不执行 后台的 namespace Ext_js { [AjaxPro.AjaxNamespace("AppAjax")] public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //注册AJax if (!Page.IsPostBack) { AjaxPro.Utility.R

为什么要用rmi代理调用远程方法

问题描述 为什么要用rmi代理调用远程方法 为什么要用rmi代理调用远程方法,为什么不直接反序列化远程对象直接调用方法. 求解?

继承-JAVA 实现接口方法时报错 implement a supertype method

问题描述 JAVA 实现接口方法时报错 implement a supertype method public interface MultimediaControl { public void play(); public void stop(); public void previous(); public void next(); } public class AudioPlayer extends Product implements MultimediaControl { String

spring定时任务-Spring 定时任务 在执行方法时报空指针

问题描述 Spring 定时任务 在执行方法时报空指针 定时任务的xml: com.boco.auto.AutoIPV6BusinessAlarmStatisticsReport 0 30 3 * * ? Spring注入: class="com.boco.web.struts.action.report.ReportCommonActionPipeRes" parent="baseAction"> <!-- add liuhuipeng -->

魅族手机input-file不能在webview中调用openFileChooser方法

问题描述 魅族手机input-file不能在webview中调用openFileChooser方法 我想在webview调用系统的相册和照相机,大部分手机都没问题,出了魅族和vivo,就根本不调用openFileChooser这个方法,求解!! 解决方案 http://bbs.anzhuo.cn/thread-942053-1-1.html

通用SQL存储过程分页以及asp.net后台调用的方法_Mysql

创建表格并添加300万数据 use Stored CREATE TABLE UserInfo( --创建表 id int IDENTITY(1,1) PRIMARY KEY not null,--添加主键和标识列 UserName varchar(50) ) declare @i int --添加3百万数据,大概4分钟时间 set @i=1 while @i<3000000 begin insert into UserInfo (UserName) values(@i) set @i=@i+1

C# 解析js方法,并调用js方法

本文转载:http://www.cnblogs.com/StudyLife/archive/2013/03/11/2953516.html 本文不是基于B/S的 后台调用前台js方法,而是给你一段js方法字符串,让你在程序中直接解析这段方法,并调用方法得到想要的值. 首先要解析Js方法,可以用微软的msscript.ocx控件(Interop.MSScriptControl.dll)来解析js方法. 1.msscript.ocx下载的地址 http://www.microsoft.com/dow