MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oracle Server connection from Windows ce

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> Compact Framework
Author Message
sgulciny



Joined: 31 Jan 2008
Posts: 2

PostPosted: Thu Jan 31, 2008 6:58 am    Post subject: Oracle Server connection from Windows ce Reply with quote

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

Archived from group: microsoft>public>dotnet>framework>compactframework
Back to top
View user's profile Send private message
Christopher Fairbairn



Joined: 08 Aug 2007
Posts: 19

PostPosted: Fri Feb 01, 2008 4:57 am    Post subject: Re: Oracle Server connection from Windows ce Reply with quote

Hi,

wrote in message @c4g2000hsg.googlegroups.com...
>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
Back to top
View user's profile Send private message
sgulciny



Joined: 31 Jan 2008
Posts: 2

PostPosted: Thu Jan 31, 2008 9:02 am    Post subject: Re: Oracle Server connection from Windows ce Reply with quote

On 31 Ocak, 12:57, "Christopher Fairbairn"
wrote:
> Hi,
>
> wrote in message
>
> @c4g2000hsg.googlegroups.com...
>

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...
Back to top
View user's profile Send private message
Rene.Scharf



Joined: 08 Aug 2007
Posts: 1

PostPosted: Tue Feb 05, 2008 6:56 pm    Post subject: Re: Oracle Server connection from Windows ce Reply with quote

Hi

schrieb im Newsbeitrag @c4g2000hsg.googlegroups.com...
>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é

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Internet connection Hi, How can I make an Internet connection using code(VB)? Thanks, Julia

Dial-up connection How can I make VB.Net call a dial-up connection (not serial dialing, but call a connection previously created to connect to a RAS Server, for example)? Tks, Arnaldo.

Connection Manager of Pocket PC 2003 Hello, where can I find some documentation on how to use the Pocket PC 2003 with the .NET

Connection to SQL 2000 from the Compact Framework Hi there, I am designing and developing a data layer for a Compact Framework application that connects to a SQL Server 2000 on our (wireless) network. Things work pretty OK: I can connect and retrieve data etc. However, I am trying to use the Microsoft Ap

SQL Server CE problem Hi, the following code always throws the exception. Why? It should simply create the table with the two rows: If Not Then Dim sqlEngine As New Source = \Program
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> Compact Framework All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group