Oracle Server connection from Windows ce

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.......
 
C

Christopher Fairbairn

Hi,

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;

[...code sample snipped...]

when I try this code I have seen
An unhandled exception of type 'System.TypeLoadException' occurred in
System.Windows.Forms.dll

The entire System.Data.OracleClient namespace and it's related functionality
isn't supported on the .NET Compact Framework.

My guess is that your .NET Compact Framework application is referencing the
desktop version of the System.Data.OracleClient assembly.

Your application compiles because the C# compiler on the desktop can find
the referenced assembly. However when the application is running on the .NET
Compact Framework (where the assembly is not present) you are getting a
TypeLoad Exception when the CLR attempts to load one of the types found
within this assembly and it can't be found.

The only slightly odd thing is that the error is being reproted within
System.Windows.Forms.dll. My only guess is that perhaps your project is also
referencing the wrong version of this assembly perhaps?

As a first step I would check the assembly references within your project
and ensure that they are all point at .NET Compact Framework versions of the
assemblies. You can do this by clicking on each reference within Solution
Explorer and viewing the properties, one of the settings will be the
location of the assembly.

When you deploy your project via Visual Studio's IDE, do you see any base
class library assemblies such as System.Data.OracleClient.dll being reported
as being deployed within the Output window?

Hope this helps,
Christopher Fairbairn
 
S

sgulciny


Assembly version is 1.0.5000.0 and I dont see its in debug output.I
can see all dll bu not System.Data.OracleClient.It's only copy to
smart device.
Where can I find its compactframework version ???Thanks for your
help...
 
R

Rene.Scharf

Hi

I friends, I have a problem about windows ce mobile device and windows
xp oracle server comp. connection.

The only way I've found to connent a oracleDb from an WM ist to use the
OraDirect component from CoreLab (http://www.crlab.com/)

But this works fine for me

Greeting
René
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top