企业库连接问题 [英] Enterprise Library Connection Problem
本文介绍了企业库连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
在企业库5中,当我使用App.Config时,其名称为test的connectionString不正确并使用此行:
Hi everyone,
In enterprise library 5 when i''m using App.Config with incorrect connectionString with name "test" and use this line:
Database DB = DatabaseFactory.CreateDatabase("test");
数据库创建成功,但是当执行以下行时会出现实质性延迟,然后是异常:
DB created successfully but when the following line executed there is a substantial delay followed by exception:
DataTable dt = DB.ExecuteDataSet(SPName, Params).Tables[0];
i我问的是为什么会出现大幅延迟?!!!
i''m asking about the substantial delay why ??!!!
推荐答案
延迟是因为它正在尝试连接数据库而不是存在,至少我假设因为你说连接字符串不正确。
the delay is because it''s trying to connect to a database that doesn''t exist, at least i''m assuming that since you say the connection string is incorrect.
这篇关于企业库连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文