[Mono-list] POSGRESQL / NPGSQL / MONO / DATASET

KiOrKY KiOrKY <kiorky@goddess-gate.com>
Tue, 8 Jun 2004 14:54:41 +0200


In fact dont help, the goal is to migrate entirely an windows application into mono environnment and the base opf this application is to
dataadpter.fill(dataset)

in anyway, i have tested datareader which work fine !

just a litlle precision :)

mono is a dream, its the last error i have at the moment !

all the classses we need at enterprise are working well !

Francisco Figueiredo Jr. <fxjrlists@yahoo.com.br> a écrit :

> KiOrKY wrote:
> 
> &gt;wan someone help to run npgsql with mono.
> &gt;in fact datareader work fine but not dataapdeter and so dataset!
> &gt;
> &gt;here is the report:
> &gt;debian sid
> &gt;kernel  2.4.26
> &gt;mcs 095
> &gt;mono 20040603
> &gt;gecko-sharp-0.4         gtksourceview-sharp-0.3         winelib-0.3
> &gt;gtk-sharp-0.93          libgdiplus-0.8                  wine20040505
> &gt;
> &gt;the base is postgresql and is not on the same machine 
> &gt;
> &gt;the result; out of memory error
> &gt;
> &gt;DB BASE SHEMA:
> &gt;base postgresql
> &gt;provider: npgsql
> &gt;table popo
> &gt;column: C1: int    C2: string
> &gt;
> &gt;
> &gt;code:
> &gt;try {
> &gt;cout.WriteLine(&quot;\t\t---------------------------------------------&quot;);
> &gt;cout.WriteLine(&quot;\t\t---     DEBUT APPLICATION              
> -----&quot;);
> &gt;cout.WriteLine(&quot;\t\t---------------------------------------------&quot;);
> &gt;string srequet =@&quot;delete from popo;&quot;;
> &gt;srequet+=@&quot;insert into popo(sssss,xdsd)&quot;;
> &gt;srequet+=@&quot;values('59','aaaaa');&quot;;
> &gt;srequet+=@&quot;insert into popo(sssss,xdsd)&quot;;
> &gt;srequet+=@&quot;values('519','aaaaa');&quot;;
> &gt;srequet+=@&quot;insert into popo(sssss,xdsd)&quot;;
> &gt;srequet+=@&quot;values('529','aaaaa');&quot;;
> &gt;srequet+=@&quot;insert into popo(sssss,xdsd)&quot;;
> &gt;srequet+=@&quot;values('359','aaaaa');&quot;;
> &gt;srequet+=@&quot;insert into popo(sssss,xdsd)&quot;;
> &gt;srequet+=@&quot;values('459','aaaaa');&quot;;	
> &gt;srequet+=@&quot;SELECT *  FROM popo&quot;;
> &gt;string srequet3=@&quot;Server=126.10.0.1;Port=5432;User
> Id=Pasquet;Database=&quot;;
> &gt;srequet3+=@&quot;Marrot;Password=kiorky&quot;;
> &gt;Npgsql.NpgsqlConnection toto = new Npgsql.NpgsqlConnection(srequet3);
> &gt;toto.Open();
> &gt;Npgsql.NpgsqlCommand cmd = new Npgsql.NpgsqlCommand(srequet,toto);
> &gt;Npgsql.NpgsqlDataAdapter DaAd = new Npgsql.NpgsqlDataAdapter(cmd);
> &gt;DataSet Dsdset = new DataSet();
> &gt;DaAd.Fill(Dsdset);
> &gt;Dsdset.AcceptChanges();							
> &gt;DataTableCollection dtccol = Dsdset.Tables;
> &gt;foreach(DataTable dtta in dtccol)
> &gt;{
> &gt;cout.WriteLine( dtta.TableName);
> &gt;foreach(DataRow drro in dtta.Rows)
> &gt;{
> &gt;cout.WriteLine(&quot;c1: {0} &lt;-&gt; c2: {1} &lt;-&gt;
> &gt;\n&quot;,(Int32)drro.ItemArray[0],drro.ItemArray[1]);				
> &gt;}
> &gt;}
> &gt;toto.Close();	
> &gt;
> &gt;
> &gt;exectuion report
> &gt;doldit100:/home/kiorky/bin/jeveux# mono toto.exe 
> &gt;                ---------------------------------------------
> &gt;                ---     DEBUT APPLICATION               -----
> &gt;                ---------------------------------------------
> &gt;execption levee: Out of memory
> &gt;doldit100:/home/kiorky/bin/jeveux# mono --debug  toto.exe 
> &gt;
> &gt;** (toto.exe:24747): WARNING **: Symbol file
> &gt;/usr//lib/mono/gac/Accessibility/1.0.5000.0__b03f5f7f11d50a3a/Accessibility.dll
> &gt;has incorrect version (expected 37, got 36)
> &gt;
> &gt;** (toto.exe:24747): WARNING **: Symbol file
> &gt;/usr//lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll
> &gt;has incorrect version (expected 37, got 36)
> &gt;
> &gt;** (toto.exe:24747): WARNING **: Symbol file
> &gt;/usr//lib/mono/gac/System.Design/1.0.5000.0__b03f5f7f11d50a3a/System.Design.dll
> &gt;has incorrect version (expected 37, got 36)
> &gt;
> &gt;** (toto.exe:24747): WARNING **: Symbol file
> &gt;/usr//lib/mono/gac/Npgsql/1.0.5000.0__5d8b90d52f46fda7/Npgsql.dll has
> &gt;incorrect version (expected 37, got 36)
> &gt;                ---------------------------------------------
> &gt;                ---     DEBUT APPLICATION               -----
> &gt;                ---------------------------------------------
> &gt;** (toto.exe:24751): WARNING **: Symbol file
> &gt;/usr//lib/mono/gac/Mono.Posix/1.0.5000.0__0738eb9f132ed756/Mono.Posix.dll
> &gt;has incorrect version (expected 37, got 36)
> &gt;
> &gt;
> &gt;-------------------&gt;   execption levee: Out of memory
> &gt;                        
> &gt;
> &gt;version:
> &gt;										doldit100:/home/kiorky/bin/jeveux# monodis --assembly
> &gt;/usr/lib/mono/gac/Npgsql/1.0.5000.0__5d8b90d52f46fda7/Npgsql.dll 
> &gt;Assembly Table
> &gt;Name:          Npgsql
> &gt;Hash Algoritm: 0x00008004
> &gt;Version:       1.0.5000.0
> &gt;Flags:         0x00000000
> &gt;PublicKey:     BlobPtr (0x000004b8)
> &gt;        Dump:
> &gt;0x00000000: 00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 
> &gt;0x00000010: 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 
> &gt;0x00000020: 2B 3C 59 0B 2A 4E 3D 34 7E 68 78 DC 0F F4 D2 1E 
> &gt;0x00000030: B0 56 A5 04 20 25 0C 66 17 04 43 30 70 1D 35 C9 
> &gt;0x00000040: 80 78 A5 DF 97 A6 2D 83 C9 A2 DB 2D 07 25 23 A8 
> &gt;0x00000050: FC 49 13 98 25 4C 6B 89 32 9B 8C 1D CE F4 3A 1E 
> &gt;0x00000060: 7A A1 61 53 BC EA 2A E9 A4 71 14 56 24 82 6F 60 
> &gt;0x00000070: D7 C8 E7 1C D0 25 B5 54 A0 17 7B D9 35 A7 80 96 
> &gt;0x00000080: 29 F0 A7 AF C7 78 EB B4 AD 03 3E 1B F5 12 C1 A9 
> &gt;0x00000090: C6 CE EA 26 B0 77 BC 46 CA C9 38 00 43 5E 77 EE 
> &gt;Culture: 
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;  
> &gt;
> 
> 
> Hi Kiorky.
> 
> Sorry for late response...
> I was in a conference here in my country and couldn't answer you in time :)
> 
> I'm at my job right now and I don't have the complete devel environment 
> setup here...
> I will try your example when I get home to see if I get the same results...
> 
> 
> I see that you are passing the delete, inserts and select to dataadapter...
> could you try to send the delete and inserts first, with 
> NpgsqlCommand.ExecuteNonQuery() and later try to use the dataadapter 
> with select only?
> 
> I hope it helps.
> 
> Regards,
> 
> Francisco Figueiredo Jr.

-- 
----------------------------
    I{ i () r |{ Y
    Debian User
---------------------------------------------
-- Mathieu PASQUET     
-- Testeur Debian SID
-- irc: #debian-fr / irc.freenode.net port: 6667 
-- Site: www.fr.debian.org 
---------------------------------------------