使用SSIS将Oracle数据库与C#连接 [英] connecting oracle database with C# using SSIS
问题描述
这是我用来从变量获取连接字符串的代码示例
字符串 connn = Dts.Variables [" ].Value.ToString();
OleDbConnection oCon = 新 OleDbConnection(connn);
并将值存储在变量= Data Source=DEV.WORLD;User ID=GCAWARDSX; Password = gcawardsx;Provider=Microsoft OLE DB Provider for Oracle;Persist Security Info=True;
中,尝试使用用于OLE DB的Oracle Provider"而不是用于Oracle的Microsoft OLE DB Provider".它解决了我.
我也遇到了相同的问题,错误代码为:ora-00911无效字符
请问我要解决这个问题
i am making a SSIS package which uses certain C# script. in this script i need to connect to ORACLE database. I have used a variable to store a value of connection string but i can''t connect my script to the Oracle Database by using the (connection string)value of this variable. The same connection string works in SSIS but i cant make connection using this string through my C# script.
heres the sample of code i used to get the connection string from the variable
string connn = Dts.Variables["OleDBConnString"].Value.ToString();
OleDbConnection oCon = new OleDbConnection(connn);
and the value stored in the variable=Data Source=DEV.WORLD;User ID=GCAWARDSX; Password = gcawardsx;Provider=Microsoft OLE DB Provider for Oracle;Persist Security Info=True;
Try using "Oracle Provider for OLE DB" rather than "Microsoft OLE DB Provider for Oracle". It solved me.
i have the same problem it give me error code: ora-00911 invalid character
please i want solution for this
这篇关于使用SSIS将Oracle数据库与C#连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!