Activation error occured while trying to get instance of type Database

如果使用ssms连接SQLserver的时候出现无法连接到服务器。 如果使用ssms连接SQLserver的时候出现无法连接到服务器。 Lan 2020-03-29 22:11 329 人阅读 0 条评论 标题: 连接到服务器------------------------------无法连接到... 阅读详情
在做winform程序时,用Microsoft.Practices.EnterpriseLibrary.Data和System.Data.SQLite在机器上测试没问题,放在虚机中试试,提示Activation error occured while trying to get instance of type Database,key'',把key加上也不对。
<configSections>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
    </configSections>
    <dataConfiguration defaultDatabase="dbconn" /> 
    <connectionStrings>
      <clear/>
        <add name="dbconn" connectionString="data source=|DataDirectory|\system\Fengxin.db;New=True;UTF8Encoding=True;Version=3"
            providerName="System.Data.SQLite" />
    </connectionStrings>

配置是没有问题。

后来才发现把Microsoft.Practices.EnterpriseLibrary.Data复制到项目下,再引用,解决问题。

Oracle EBS Interface/API(49)- AP付款取消API Oracle EBS AP付款取消API介绍和简单实例 阅读详情

相关推荐

Paho Asynchronous MQTT C Client Library--MQTTAsync API

异步MQTT 客户端库for C

yoyo勰的博客 1264

微软企业库--Activation error occured while trying to get instance of type Database

Database db = DatabaseFactory.CreateDatabase(); DbCommand dc = db.GetStoredProcCommand("proc", parameters); dc.ExecuteNonQuery(); int a= (int)db.GetParameterValue(d

我的地盘 6606

PLC编程标准之争:IEC61131与IEC61499核心区别与选型指南

在工业自动化领域,PLC编程长期依赖IEC61131标准,它定义了梯形图、结构化文本等语言,通过周期扫描机制保证确定性执行。然而,随着工业4.0和分布式控制场景的兴起,IEC61499以事件驱动模型打破传统范式,让功能块能跨设备协同,实现更灵活的柔性产线和模块化系统。理解两者在程序结构、数据交互、部署方式和实时性上的差异,是选型与工程落地的关键。本文从基础概念出发,剖析执行模型与架构演进,结合一线调试经验,帮助工程师在传统PLC与下一代标准之间做出理性决策。

weixin_27014595的博客 270

Activation error occured while trying to get instance of type IcacheManager,key

又是一个困扰了我一天的问题,我们的项目使用的是微软企业库5.0,使用了其中的缓存机制。最近C++工作组需用调用一个wsdl来获取我们的数据,所以就在之前的WCF服务中添加了获取数据的功能,调用服务需要身份验证,并且把验证信息存放在缓存中,用到了企业库的IcacheManger,用EntLib Config.NET 5.0 生成了相应的配置文件,添加了到了本地的config文件中(具体的配置文件信息

liujiebest的专栏 6116

Upwork数据战争:用爬虫与AI预测垄断订单

当普通自由职业者还在“等客户发需求”时,顶尖玩家已用数据预测客户明天需要什么; 当竞争对手熬夜抢单时,你的爬虫早已自动提交提案—— 这不是科幻,而是2025年的现实! 本文将手把手教你用合法工具搭建“数据战情室”,让每个决策都有万亿级数据支撑!

qq_61813593的博客 982

用UltraISO制作镜像以RAW格式刻录系统到U盘后,在Windows上无法识别的解决办法

在这篇文章中,用UltraISO制作镜像后,会使得U盘无法识别!!!那么,如何抹掉U盘的数据,格式化U盘呢?

拥抱具身智能,昇腾Ascend C 2730

Activation error occured while trying to get instance of type Database key

配置默认连接<dataConfiguration defaultDatabase="Database Connection String"> 否则就必须传递参数进去Database db = DatabaseFactory.CreateDatabase(strConString); <add name="Database Connection String" ...

weixin_30432179的博客 523

MoveIt2项目想换掉KDL求解器?试试这个trac_ik插件(附源码编译避坑指南)

本文详细介绍了如何在MoveIt2项目中用trac_ik插件替代KDL求解器,提升机械臂运动学求解的效率和成功率。内容涵盖环境准备、源码编译避坑、项目集成及性能调优,特别适合需要高精度控制的协作机械臂应用场景。通过实测数据对比,trac_ik在求解时间和奇异点处理上显著优于传统KDL求解器。

weixin_30730053的博客 697

(Entlib 5.0)Activation error occured while trying to get instance of type ICacheManager, key ""求解决办法

如下图:

Lonely Traveler 3748

STM32内存大小与地址的对应关系以及计算方法

1、概述 在计算机中要访问存储区,都是通过地址来进行访问的,包括所有的外设(比如串口、内存、硬盘等),都对应有一个访问地址,地址就相当于门牌号,有了门牌号,我们才知道操作的是哪一个区域、哪一个外设。 最被大家熟知的是计算机内存,计算机内存有4G、8G,16G等等,对于程序员而言,要在代码中操作这些内存,肯定得知道内存的地址,此外,还需要会计算地址与内存大小的计算方法与对应关系。STM32作为微

Ace's Blog 4万+

gradle报错:A problem occurred configuring root project ‘My Application‘.

即使翻译了,我开始也看不懂,到处找网上教程,但都是改环境变量。马虎的我即使看了很多遍,改了很多遍也没反应过来,今天第一次搞gradle,突然就报错了,打印出。好了我就继续看项目了。

m0_59878789的博客 4091

Linux下.NET连接MySQL数据库出错问题解决复盘

一天多,两个晚上,终于解决了Linux下.net 连接MySQL数据库的问题了。 大佬写的类库就是高深牛叉,以后还得多学点高级货啊,24个工程相互调用,完全搞懂了就真是人才了

龙井茶的Sky 2024

华为OD机试 - 商品推荐多属性排序 - 数组(Python/JS/C/C++ 双机位A卷 100分)

本专栏收录于《华为OD机试真题(Python/JS/C/C++)》。刷的越多,抽中的概率越大,私信哪吒,备注华为OD,加入华为OD刷题交流群,每一题都有详细的答题思路、详细的代码注释、3个测试用例、为什么这道题采用XX算法、XX算法的适用场景,发现新题目,随时更新。双十一来临,小王准备买某个购物平台买坚果。在输入坚果时,页面默认按照综合推荐列表。小王想知道这个综合排序时如何完成的,于是便开始思考算法题。经过一番操作后,完成它的多个关键词排序算法。希望你给小王提供一份正确的排序结果,验证其实现算法结果的准确性

学Java,找哪吒 622

[大数据技术]Kettle初次连接MySQL数据库 报错问题 错误连接数据库 Error occured while trying to connect to the database Excep...

报错内容如下: 1 错误连接数据库 [foodmartconn] : org.pentaho.di.core.exception.KettleDatabaseException: 2 Error occured while trying to connect to the database 3 4 Exception while loading class 5 org....

weixin_43847567的博客 962

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

解决微软企业类库 EnterpriseLibrary 中 DatabaseFactory.CreateDatabase 失败问题

今天用 netTiers 生成了一套代码,用的时候发现如果使用  DatabaseFactory.CreateDatabase()  失败,抛出以下异常 Activation> <add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.

greenery的专栏 4302

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Gitlab 服务器搭建,maven安装与jdk安装,linux下安装git

Gitlab 服务器搭建 资源地址: 链接:https://pan.baidu.com/s/1SOLyixV7UkkLj0WWQqanDQ 提取码:fjcl 官网地址 首页:https://about.gitlab.com/ 安装说明:https://a...

苏凯的博客 1187

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

entlib连接oracle乱码,无法构造类型数据库。您必须配置容器以提供此值(EntLib 5 + ODP.NET)...

我使用企业库的ODP.NET和4.1版本,对比2008年。并且一切正常。现在,使用Enterprise Library的ODP.NET Oracle.DataAccess 4.112.2.0和版本5.0.414.0迁移到2010,.net 4.0。Oracle.DataAccess 4.112.2.0EnterpriseLibrary 5.0.414.0在最近从企业库版本4.1升级到5.0之后,一...

weixin_39858245的博客 372

Error occured while trying to proxy to: localhost:端口号/

Error occured while trying to proxy to: localhost:端口号/ 1.查看报错信息 我在浏览器的报错信息如下(完全不知所错,直接复制去度娘也没有答案) Error occured while trying to proxy to: localhost:9285/ 于是继续查看控制台报错信息如下 按照提...

The more fighting, the more brave 7万+

运行 openfire4.04 ServerStarter 报异常 AdminConsolePlugin:192 - An exception occurred while trying to mak

AdminConsolePlugin:192 - An exception occurred while trying to make available the admin console via HTTPS

王人冉的博客 2936
上一篇: SQL行转列备忘
下一篇: google地图通过经纬度查询位置
firehou
博客等级 码龄17年 114粉丝 46原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值