hello
i write a winform app,in the form there is a datagrid and a button.when i click the button,it connect to the oracle,and retrieve the data to display them in the datagrid.the button click event code as following:
private void button1_Click(object sender, System.EventArgs e)
{
DataSet dataSet1=new DataSet("dataset1");
String connectionString="Data Source=zbcdb;User Id=scott;Password=password
;";
OracleConnection connection1=new OracleConnection(connectio
nString);
OracleCommand command1=new OracleCommand("select * from emp");
command1.CommandType=Comma
ndType.Tex
t;
connection1.Open();
command1.Connection=connec
tion1;
OracleDataAdapter oracleDataAdapter1=new OracleDataAdapter();
oracleDataAdapter1.SelectC
ommand=com
mand1;
oracleDataAdapter1.Fill(da
taSet1,"em
p");
dataGrid1.SetDataBinding(d
ataSet1,"e
mp");
}
both the visual studio and oracle database are installed in my machine,when i try it in my machine,it works well,but after i copy the "exe" file to the iis(NO-TOUCH DEPLOYMENT),and call it from the OTHER client machine,the following exception is thrown:
************** Exception Text **************
System.DllNotFoundExceptio
n: Unable to load DLL (oci.dll).
at System.Data.OracleClient.D
BObjectPoo
l.GetObjec
t(Object owningObject, Boolean& isInTransaction)
at System.Data.OracleClient.O
racleConne
ctionPoolM
anager.Get
PooledConn
ection(Str
ing encryptedConnectionString,
OracleConnectionString options, OracleConnection owningObject, Boolean& isInTransaction)
at System.Data.OracleClient.O
racleConne
ction.Open
Internal(O
racleConne
ctionStrin
g parsedConnectionString, Object transact)
at System.Data.OracleClient.O
racleConne
ction.Open
()
at ch10_01.Form1.button1_Clic
k(Object sender, EventArgs e)
at System.Windows.Forms.Contr
ol.OnClick
(EventArgs
e)
at System.Windows.Forms.Butto
n.OnClick(
EventArgs e)
at System.Windows.Forms.Butto
n.OnMouseU
p(MouseEve
ntArgs mevent)
at System.Windows.Forms.Contr
ol.WmMouse
Up(Message
& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Contr
ol.WndProc
(Message& m)
at System.Windows.Forms.Butto
nBase.WndP
roc(Messag
e& m)
at System.Windows.Forms.Butto
n.WndProc(
Message& m)
at System.Windows.Forms.Contr
olNativeWi
ndow.OnMes
sage(Messa
ge& m)
at System.Windows.Forms.Contr
olNativeWi
ndow.WndPr
oc(Message
& m)
at System.Windows.Forms.Nativ
eWindow.Ca
llback(Int
Ptr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
..........................
..........
.........
..........................
..........
.........
..........................
..........
.........
..........................
..........
..........
--------------------------
----------
----
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/
gac/system
.data/1.0.
5000.0__b7
7a5c561934
e089/syste
m.data.dll
--------------------------
----------
----
....................
...................
--------------------------
----------
----
System.Data.OracleClient
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/
gac/system
.data.orac
leclient/1
.0.5000.0_
_b77a5c561
934e089/sy
stem.data.
oracleclie
nt.dll
--------------------------
----------
----
..........................
..........................
.
..........................
..
as you can see,the client can't find the "oci.dll",because i haven't installed the oracle client software in the client machine,and i don't want to install ANY software in the client side. so that i try to copy the "oci.dll" to the same directory in the iis as the exe file.but client can't find it EITHER.maybe i should write the config file to tell the client where to find the "oci.dll",but i don't know how because i am a newbie to dotnet.
who can tell me how to solve the problem?
thank you very much!!!!!