OracleConnection for Windows Mobile

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
StealthOMS
Posts: 1
Joined: Tue 25 May 2010 12:37

OracleConnection for Windows Mobile

Post by StealthOMS » Tue 25 May 2010 12:48

I have project on C# on VS2008. When i try to open connection to oracle from static constructor of static class i have Exception "Server did not respond within the specified timeout interval". Whan I do this from static member of static class all work fine. How can I open connection to oracle from static constructor of static class?

This code raice exception:
static class ERPDB
{
static int a;
public static void tst()
{
a = 1;
}

static ERPDB()
{
string myConnectionString = "User Id=S;Password=s;Data Source=10.1.1.1;SID=TT";
OracleConnection myConn = new OracleConnection(myConnectionString);

myConn.Open();
}
}

I call ERPDB.tst();

This code work fine:
static class ERPDB
{
static int a;
public static void tst()
{
a = 1;
string myConnectionString = "User Id=S;Password=s;Data Source=10.1.1.1;SID=TT";
OracleConnection myConn = new OracleConnection(myConnectionString);

myConn.Open();
}

static ERPDB()
{
}
}

I call ERPDB.tst();

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 26 May 2010 16:58

We've reproduced the problem. We will investigate it and notify you about the results.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 03 Jun 2010 16:28

We've investigated the problem. A possible workaround is to set the Connection Timeout property to 0. The problem itself is a peculiarity of .NET Compact Framework.

Post Reply