S
sgulciny
I friends, I have a problem about windows ce mobile device and windows
xp oracle server comp. connection.
I develop project with visual .net 2003 c# smart device application.
using System.Data.OracleClient;
private void sendData_Click(object sender, System.EventArgs e)
{
OracleConnection oraConn = new
OracleConnection("host=host_name;Port=1521;Service
Name=service_name;User ID=user_id;Password=pass");
//OracleConnection oraConn = new OracleConnection("server =
service_name;uid = user;password = pass;");
// string connString = @"server = service_name;uid = user;password =
pass;";
// OracleConnection oraConn = new OracleConnection(connString);
// OracleConnection oraConn = new
OracleConnection("Provider=MSDAORA.1;User ID=user;Password=pass;Data
Source=datasource");
//OracleConnection oraConn = new OracleConnection();
// oraConn.ConnectionString = "Data
Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host_name)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service_name)));User
Id=user;Password=pass";
try
{
oraConn.Open();
Console.WriteLine("Connection opened.");
Console.WriteLine("Connection Properties:");
Console.WriteLine("\tConnection String: {0}",
oraConn.ConnectionString);
Console.WriteLine("\tServerVersion: {0}", oraConn.ServerVersion);
Console.WriteLine("\tState: {0}", oraConn.State);
}
catch (OracleException eZ)
{
MessageBox.Show (eZ.ToString());
Console.WriteLine("Error: " + eZ);
}
finally
{
oraConn.Close();
Console.WriteLine("Connection closed.");
}
}
when I try this code I have seen
An unhandled exception of type 'System.TypeLoadException' occurred in
System.Windows.Forms.dll
why I can not connect oracle server from windows ce smart device??
Thanks for help.......
xp oracle server comp. connection.
I develop project with visual .net 2003 c# smart device application.
using System.Data.OracleClient;
private void sendData_Click(object sender, System.EventArgs e)
{
OracleConnection oraConn = new
OracleConnection("host=host_name;Port=1521;Service
Name=service_name;User ID=user_id;Password=pass");
//OracleConnection oraConn = new OracleConnection("server =
service_name;uid = user;password = pass;");
// string connString = @"server = service_name;uid = user;password =
pass;";
// OracleConnection oraConn = new OracleConnection(connString);
// OracleConnection oraConn = new
OracleConnection("Provider=MSDAORA.1;User ID=user;Password=pass;Data
Source=datasource");
//OracleConnection oraConn = new OracleConnection();
// oraConn.ConnectionString = "Data
Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host_name)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service_name)));User
Id=user;Password=pass";
try
{
oraConn.Open();
Console.WriteLine("Connection opened.");
Console.WriteLine("Connection Properties:");
Console.WriteLine("\tConnection String: {0}",
oraConn.ConnectionString);
Console.WriteLine("\tServerVersion: {0}", oraConn.ServerVersion);
Console.WriteLine("\tState: {0}", oraConn.State);
}
catch (OracleException eZ)
{
MessageBox.Show (eZ.ToString());
Console.WriteLine("Error: " + eZ);
}
finally
{
oraConn.Close();
Console.WriteLine("Connection closed.");
}
}
when I try this code I have seen
An unhandled exception of type 'System.TypeLoadException' occurred in
System.Windows.Forms.dll
why I can not connect oracle server from windows ce smart device??
Thanks for help.......