Can I use OraDirect .Net to develop Pocket PC(with wireless) application?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
qhonge

Can I use OraDirect .Net to develop Pocket PC(with wireless) application?

Post by qhonge » Wed 17 Aug 2005 03:06

Can I use OraDirect .Net to develop Pocket PC(with wireless) application?
I want use OraDirect .Net to develop Pocket PC application with .Net Compact Framwork, But I don't know how to do it.

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 17 Aug 2005 06:55

Please use OraDirect .NET 3 Mobile version with Visual Studio 2003. Please see sample projects.

qhonge

thank you!

Post by qhonge » Wed 17 Aug 2005 11:10

But It throw
An unhandled exception of type 'CoreLab.OracleExcepion' occurred in CoreLab.Oracle.dll

Why?

qhonge

Error

Post by qhonge » Wed 17 Aug 2005 11:14

An unhandled exception of type 'CoreLab.Oracle.OracleException' occurred in DataReader.exe

qhonge

errors in sample

Post by qhonge » Wed 17 Aug 2005 11:54

I connect my server with
ConnectionString = "user id=dev;password=dev;host=192.168.0.246;sid=test;";

It throw OracleException,I think so
But In Pocket PC can't handle the OracleException

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 17 Aug 2005 13:34

Please write try...catch block around your code. Please check that sid value is correct as described in OraDirect .NET documentation. This value is different from "Data Source" parameter in general.
Do you have this problem with sample projects?

qhonge

Yes

Post by qhonge » Wed 17 Aug 2005 14:39

Yes,I have this problem with sample projects.
My IDE is .Net Studio 2003
Is it just support 2005 or other problem?

but, I can connect my oracle server with sql*plus

qhonge

I test it

Post by qhonge » Thu 18 Aug 2005 02:02

I have test my server with JDBC! It work well!

Is something wrong with your .Net Drivers? I can't sure so!

qhonge

Post by qhonge » Thu 18 Aug 2005 02:26

Even I test the PC sample project!
It throw the same Exceptions!

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Thu 18 Aug 2005 06:21

What is the version of Oracle server, OraDirect .NET Mobile? Which line in code generates OracleException?
Can you write the next code to see error message?

Code: Select all

try {
...
}
catch(Exception ex) {
  label1.Text = ex.Message;
}
Please check that you take SID from SERVICE_NAME parameter in tnsnames.ora. For
example SID='orcl920' for the next settings

Code: Select all

ORA920 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl920)
      (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES=100)
(DELAY=1))
    )
  )

qhonge

thank you

Post by qhonge » Thu 18 Aug 2005 06:53

I use Oracle 8i and OraDirect .Net Mobile 3.0

I have debuged the sample code. When It run connection.open(), It will throw exception

I catch the message of the exception,but it is null,so I can't sure what is wrong with it.

I have check the tnsname.ora, The sid is right! and I can use the sid connect my server with JDBC driver

Code: Select all

TEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.246)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test)
    )
  )
This is the sample code for test

Code: Select all

      try {
        Cursor.Current = Cursors.WaitCursor;

        connection.Open();

        Cursor.Current = Cursors.Default;

        DialogResult = DialogResult.OK;
      }
      catch (OracleException exception) {

        Cursor.Current = Cursors.Default;

    //    MessageBox.Show(exception.Message);

        retries--;
        if (retries == 0)
          DialogResult = DialogResult.Cancel;

        switch (exception.Code) 
		{
          case 1005:
            edPassword.Focus();
            break;
          case 1017:
            ActiveControl = edPassword;
            break;
          case 12203:
          case 12154:
            edServer.Focus();
            break;
        }

        throw;
      }

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Thu 18 Aug 2005 11:12

We cannot reproduce your problem with OraDirect .NET Mobile 3.01.2, Oracle server 8.1.7
Try the last OraDirect .NET version

qhonge
Posts: 2
Joined: Thu 18 Aug 2005 09:10

Disppointment

Post by qhonge » Fri 19 Aug 2005 03:41

I just download it last day! I think it is last version! I just want to test it!!

I'm so disppointed to know oraDirect can't Direct!

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Thu 01 Sep 2005 08:51

We found the problem with OraDirect .NET when it works in Windows with multibyte national charset. You can work in this situation when you set Unicode=true in OracleConnection.ConnectionString. (We will correct bug with updating strings in Unicode=true mode in the next OraDirect .NET build)

We cannot reproduce your problem with connection to Oracle 8.1.7 windows 2000 database. Possibly some settings are different. Please send us result of executing "select * from nls_database_parameters"

Post Reply