mail-archives/mono-bugs/2004-June/017296.html

149 строки
5.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 59939][Nor] Changed - OracleConnection:Open throth unhandled exection on Mac OS X 10.3.4
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="017295.html">
<LINK REL="Next" HREF="017297.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 59939][Nor] Changed - OracleConnection:Open throth unhandled exection on Mac OS X 10.3.4
</H1>
<B>bugzilla-daemon@bugzilla.ximian.com
</B>
<A HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com"
TITLE="[Mono-bugs] [Bug 59939][Nor] Changed - OracleConnection:Open throth unhandled exection on Mac OS X 10.3.4">bugzilla-daemon@bugzilla.ximian.com
</A><BR>
<I>Sun, 13 Jun 2004 12:05:52 -0400 (EDT)</I>
<P><UL>
<LI> Previous message: <A HREF="017295.html">[Mono-bugs] [Bug 59008][Min] Changed - MacOSX assembler is not compatible with --aot output
</A></li>
<LI> Next message: <A HREF="017297.html">[Mono-bugs] [Bug 60095][Wis] Changed - (x &amp; 0) == 0 is a constant true
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#17296">[ date ]</a>
<a href="thread.html#17296">[ thread ]</a>
<a href="subject.html#17296">[ subject ]</a>
<a href="author.html#17296">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by <A HREF="mailto:dieter@fiebelkorn.net.">dieter@fiebelkorn.net.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=59939">http://bugzilla.ximian.com/show_bug.cgi?id=59939</A>
--- shadow/59939 2004-06-13 11:31:17.000000000 -0400
+++ shadow/59939.tmp.30997 2004-06-13 12:05:52.000000000 -0400
@@ -3385,6 +3385,85 @@
On Linux the code works right. I don't understand it!
------- Additional Comments From <A HREF="mailto:lupus@ximian.com">lupus@ximian.com</A> 2004-06-13 11:31 -------
Could you check what type reader[&quot;mdname&quot;] is?
Add a Console.WriteLine (reader[&quot;mdname&quot;].GetType ());
+
+------- Additional Comments From <A HREF="mailto:dieter@fiebelkorn.net">dieter@fiebelkorn.net</A> 2004-06-13 12:05 -------
+iMac:~/Desktop dieter$ mono TestExample.exe
+Name: (Type: System.DBNull) - Id: MDNAME (Type: System.DBNull)
+Name: (Type: System.DBNull) - Id: MDNAME (Type: System.DBNull)
+Name: (Type: System.DBNull) - Id: MDNAME (Type: System.DBNull)
+Name: (Type: System.DBNull) - Id: MDNAME (Type: System.DBNull)
+Name: (Type: System.DBNull) - Id: MDNAME (Type: System.DBNull)
+
+=====
+
+iMac:~/Desktop dieter$ expand -4 TestExample.cs
+ using System;
+ using System.Data;
+ using System.Data.OracleClient;
+
+ public class Test
+ {
+ public static void Main (string[] args)
+ {
+ string connectionString =
+ &quot;Data Source=Axxx;&quot; +
+ &quot;User ID=xxx;&quot; +
+ &quot;Password=xxx;&quot;;
+ OracleConnection dbcon = null;
+ dbcon = new OracleConnection (connectionString);
+ dbcon.Open ();
+ OracleCommand dbcmd = dbcon.CreateCommand ();
+ string sql = &quot;SELECT 'TEST', mdname, mdid FROM mdpatient&quot;;
+ dbcmd.CommandText = sql;
+ OracleDataReader reader = dbcmd.ExecuteReader ();
+ while (reader.Read ()) {
+// string name = (string) reader[&quot;mdname&quot;];
+// string job = (string) reader[&quot;mdid&quot;];
+ string name = reader[&quot;mdname&quot;].ToString();
+ string job = reader.GetName(1);
+ Console.WriteLine (&quot;Name: {0} (Type: {1}) - Id: {2} (Type: {3})&quot;,
+ name, reader[&quot;mdname&quot;].GetType(),
+ job, reader[&quot;mdid&quot;].GetType());
+ }
+ // clean up
+ reader.Close ();
+ reader = null;
+ dbcmd.CommandText = sql;
+// dbcmd.ExecuteNonQuery ();
+ dbcmd.Dispose ();
+ dbcmd = null;
+ dbcon.Close ();
+ dbcon = null;
+ }
+ }
+
+=====
+
+iMac:~ dieter$ sqlplus xxx/<A HREF="mailto:xxx@Axxx">xxx@Axxx</A>
+
+SQL*Plus: Release 9.2.0.1.0 - Developer's Release on So Jun 13 17:35:32 2004
+
+Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
+
+
+Verbunden mit:
+Oracle9i Enterprise Edition Release 9.2.0.1.0 - Developer's Release
+With the Partitioning and Oracle Data Mining options
+
+SQL&gt; select mdname, mdid from mdpatient;
+
+MDNAME MDID
+------------------------------ ------------
+Vorbelegung 9998FFFF
+Datensammler 9999FFFF
+Fiebelkorn F00001
+Proband F00002
+Carsten Meyer . F00003
+
+5 Zeilen ausgew?hlt.
+
+SQL&gt;
+
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="017295.html">[Mono-bugs] [Bug 59008][Min] Changed - MacOSX assembler is not compatible with --aot output
</A></li>
<LI> Next message: <A HREF="017297.html">[Mono-bugs] [Bug 60095][Wis] Changed - (x &amp; 0) == 0 is a constant true
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#17296">[ date ]</a>
<a href="thread.html#17296">[ thread ]</a>
<a href="subject.html#17296">[ subject ]</a>
<a href="author.html#17296">[ author ]</a>
</LI>
</UL>
</body></html>