[Mono-list] OracleClient

Álex López García alopezg@cspt.es
Tue, 2 Nov 2004 12:50:50 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C4C0DA.952B1A50
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

=20

            I am trying to run the code below, but it doesn't seem to wor=
k.I
am only filling a dataset, but I always get an exception.=20

=20

Module Module1

=20

    Sub Main()

        Try

            Dim lCnn As IDbConnection

            lCnn =3D New OracleClient.OracleConnection("Data Source=3Dmon=
o;user
id=3DXXXXX;pwd=3DYYYYY")

            lCnn.Open()

            Dim lAdapter As IDbDataAdapter

            lAdapter =3D New OracleClient.OracleDataAdapter("SELECT * fro=
m
Test", lCnn)

            Dim lDataSet As DataSet

            lDataSet =3D New DataSet("Test")

            Console.WriteLine("Before Fill")

            lAdapter.Fill(lDataSet)

            Console.WriteLine("After Fill")

        Catch ex As Exception

            Console.WriteLine(ex.ToString)

        End Try

    End Sub

=20

End Module

=20

=20

     I am running under linux with the last version of mono and I am
connecting to oracle. What can I do? Is the fill method running ok under
oracle?=20

=20

      Thank you very much !! Alex

=20

=20

=C1lex L=F3pez Garc=EDa

Area de desenvolupament del RAIM Server

Centre d'Imatge M=E8dica Digital

UDIAT - PARC TAULI, S/N - Sabadell - Barcelona

Tel. 93 693 33 22

=20


------=_NextPart_000_001F_01C4C0DA.952B1A50
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:=
schemas-microsoft-com:office:word" xmlns:st1=3D"urn:schemas-microsoft-com=
:office:smarttags" xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri=3D"urn:schemas-microsoft-com:office:smarttag=
s"
 name=3D"place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EstiloCorreo17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size=
:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size=
:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size=
:10.0pt;
font-family:Arial'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 </span></font><font =
size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier New"'>I am trying to run t=
he code
below, but it doesn't seem to work.I am only filling a dataset, but I alw=
ays
get an exception. <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier New"><sp=
an
style=3D'font-size:10.0pt;font-family:"Courier New";color:blue'>Module</s=
pan></font><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt;font-family=
:"Courier New"'>
Module1<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <font color=3Dblue><span
style=3D'color:blue'>Sub</span></font> <st1:place w:st=3D"on">Main</st1:p=
lace>()<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <fo=
nt
color=3Dblue><span style=3D'color:blue'>Try<o:p></o:p></span></font></spa=
n></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
<font color=3Dblue><span style=3D'color:blue'>Dim</span></font> lCnn <fon=
t
color=3Dblue><span style=3D'color:blue'>As</span></font> IDbConnection<o:=
p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
lCnn =3D <font color=3Dblue><span style=3D'color:blue'>New</span></font>
OracleClient.OracleConnection(&quot;Data Source=3Dmono;user
id=3DXXXXX;pwd=3DYYYYY&quot;)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
lCnn.Open()<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
<font color=3Dblue><span style=3D'color:blue'>Dim</span></font> lAdapter =
<font
color=3Dblue><span style=3D'color:blue'>As</span></font> IDbDataAdapter<o=
:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
lAdapter =3D <font color=3Dblue><span style=3D'color:blue'>New</span></fo=
nt>
OracleClient.OracleDataAdapter(&quot;SELECT * from Test&quot;, lCnn)<o:p>=
</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
<font color=3Dblue><span style=3D'color:blue'>Dim</span></font> lDataSet =
<font
color=3Dblue><span style=3D'color:blue'>As</span></font> DataSet<o:p></o:=
p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
lDataSet =3D <font color=3Dblue><span style=3D'color:blue'>New</span></fo=
nt>
DataSet(&quot;Test&quot;)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
Console.WriteLine(&quot;Before Fill&quot;)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;
&nbsp;&nbsp;lAdapter.Fill(lDataSet)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
Console.WriteLine(&quot;After Fill&quot;)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <fo=
nt
color=3Dblue><span style=3D'color:blue'>Catch</span></font> ex <font colo=
r=3Dblue><span
style=3D'color:blue'>As</span></font> Exception<o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;
Console.WriteLine(ex.ToString)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <fo=
nt
color=3Dblue><span style=3D'color:blue'>End</span></font> <font color=3Db=
lue><span
style=3D'color:blue'>Try<o:p></o:p></span></font></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <font color=3Dblue><span
style=3D'color:blue'>End</span></font> <font color=3Dblue><span style=3D'=
color:blue'>Sub<o:p></o:p></span></font></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier New"><sp=
an
style=3D'font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbs=
p;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier New"><sp=
an
style=3D'font-size:10.0pt;font-family:"Courier New";color:blue'>End</span=
></font><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt;font-family=
:"Courier New"'>
<font color=3Dblue><span style=3D'color:blue'>Module<o:p></o:p></span></f=
ont></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Courier New"><sp=
an
style=3D'font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbs=
p;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am running und=
er
linux with the last version of mono and I am connecting to oracle. What c=
an I
do? Is the fill method running ok under oracle? <o:p></o:p></span></font>=
</p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span style=3D'f=
ont-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thank you very =
much
!! Alex<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size=
:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size=
:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><strong><b><font size=3D3 face=3DArial><span lang=3D=
ES
style=3D'font-size:12.0pt;font-family:Arial'>=C1lex L=F3pez Garc=EDa</spa=
n></font></b></strong><span
lang=3DES><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DES style=3D=
'font-size:10.0pt;
font-family:Arial'>Area de desenvolupament del RAIM Server</span></font><=
span
lang=3DES><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DES style=3D=
'font-size:10.0pt;
font-family:Arial'>Centre d'Imatge M=E8dica Digital</span></font><span la=
ng=3DES><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DES style=3D=
'font-size:10.0pt;
font-family:Arial'>UDIAT - PARC TAULI, S/N - Sabadell - Barcelona</span><=
/font><span
lang=3DES><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size=
:10.0pt;
font-family:Arial'>Tel. 93 693 33 22</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D=
'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_001F_01C4C0DA.952B1A50--