[Mono-list] Test cases in VB.NET

2004-07-26 Thread Manjula G H M
Around 900 standalone test cases are checked in CVS in
mcs/class/Microsoft.VisualBasic/Test/standalone directory. Around 700
tests was written by Mainsoft and some 200 tests written by Novell
intern.  We should finally integrate with Nunit and make it more
complete. Feel free to add or enhance it to run under Nunit.

Thanks
Manjula

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] typeof and sizeof pointer types

2004-07-26 Thread Malcolm Parsons
On Sun, Jul 25, 2004 at 08:14:20PM +, Alan Jenkins wrote:
 typeof (float) == typeof (float*)
 sizeof (float) == sizeof (float*)
 
 Is this really the correct behaviour?  I can see there are problems with 
 unique types for pointers, because there is an infinite number - float, 
 float*, float**, etc - but I would have thought it would be important to get 
 sizeof right.

sizeof is correct.

both a float and a pointer to a float use 4 bytes ( on a 32 bit cpu ).

typeof is incorrect.

typeof( float) is System.Single
typeof( float *  ) should be System.Single*, but isn't in mono.
typeof( float [] ) is System.Single[]

-- 
Malcolm Parsons
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] stop in the FreeBSD's ports install

2004-07-26 Thread John Merryweather Cooper
On Sunday 25 July 2004 10:28 pm, Millet Z wrote:
 mono-list

  i install mono in FreeBSD 4.10,but stop in the make install.when
 it's copying the dlls to GAC,it stop.who can tell me about this?

 
 


 Millet Z
 [EMAIL PROTECTED]
 2004-07-26

It is more helpful if you write me directly at [EMAIL PROTECTED] concerning 
FreeBSD-related problems than if you write this list.  First, I'll be 
completely unaware of a FreeBSD-related problem otherwise.  Second, there's 
more expertise on the problem on [EMAIL PROTECTED] and to myself at 
[EMAIL PROTECTED]

In a nutshell, some configurations of -STABLE result in deadlocks of some sort 
either in libgc or in the threading library itself (on -STABLE, this is 
libc_r) when running gacutil.exe during the install.  Actually, considerably 
more is going on than just copying of files.  gacutil.exe is itself a Mono 
program.

jmc
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] SecurityPermissionAttribute Excluded - Why?

2004-07-26 Thread Vivek Varma
Hi,

I noticed that SecurityPermissionAttribute is excluded from the build of mscorlib.dll 
on windows. The comment in the build file said custom security attributes problem. 
Trying to build mscorlib with scs on windows SecurityPermissionAttribute.cs did throw 
a compile error CS1577.
Could someone explain what this means and why SecurityPermissionAttribute.cs is not 
included in a build of mscorlib on windows?


Thanks in advance
Vivek

[Mono-list] WebService, SessionState and CookieContainer

2004-07-26 Thread beniniva

 Hi,
I try to run a simple example of stateful web service. This example run well on
windows with Explorer but no on Mono with Apache, why?
 
In order to maintain stateful communication between a client application and a
server application,I use session objects and the cookie container.
On the Server I must explicitly enable session support for each Web service
method that requires a session state ( [WebMethod ( EnableSession = true )] )
On the Client application, I use cookie http with
System.Web.SessionState.HttpSessionState and System.Net.CookieContainer
classes.
When the web service method uses a session state, a cookie is passed back to the
Web Service client in the response header. That cookie uniquely identifies the
session for that Web Service client.
To receive that cookie for the web service client, a new instance of
CookieContainer must be created and then assigned to the CookieContainer
property before the Web service method is called. This make sure that the
cookie is correctly included in subsequent requests. I must do this because I
must store the cookies that are received in the session state for future
retrieval by the session.
The web services code is:Service1.asmx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
...
...
...
[ WebMethod(Description=Per session Hit Counter,EnableSession=true)]
  public int SessionHitCounter()  
  {
if (Session[HitCounter] == null)  
{
   Session[HitCounter] = 1;
}
else  
{
   Session[HitCounter] = ((int) Session[HitCounter]) + 1;
}
return ((int) Session[HitCounter]);
  }

 
The client application code is:WebForm1.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Net;
.
.
  // Create a new instance of a proxy class for your XML Web service.
  private ServerUsage.Service1 su = new ServerUsage.Service1();
  private CookieContainer cookieJar;
..
  private void Button1_Click(object sender, System.EventArgs e)
  {
   
 
// Check to see if the cookies have already been saved for this session.
if (Session[CookieJar] == null)  
   cookieJar= new CookieContainer();
else
   cookieJar = (CookieContainer) Session[CookieJar];
 
// Assign the CookieContainer to the proxy class.
su.CookieContainer = cookieJar;
 
// Invoke an XML Web service method that uses session state and thus
cookies.
int count = su.SessionHitCounter();
 
// Store the cookies received in the session state for future retrieval by
this session.
Session[CookieJar] = cookieJar;
 
// Populate the text box with the results from the call to the XML Web
service method.
Label1.Text = count.ToString();  
   
 
  }


I've mono 1.0 installed. 

Where I mistake?

Could anybody help me, please?
 
Thanks a lot,
 
Valentina.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] WebService, SessionState and CookieContainer

2004-07-26 Thread Lluis Sanchez
Valentina:

You already reported this bug and it has already been fixed. You only
need to wait for the next Mono release or compile it yourself from CVS.
There is no need to send this bug report over and over on all mono
lists.

Thanks,
Lluis.


On dl, 2004-07-26 at 16:46, [EMAIL PROTECTED] wrote:
  Hi,
 I try to run a simple example of stateful web service. This example run well on
 windows with Explorer but no on Mono with Apache, why?
  
 In order to maintain stateful communication between a client application and a
 server application,I use session objects and the cookie container.
 On the Server I must explicitly enable session support for each Web service
 method that requires a session state ( [WebMethod ( EnableSession = true )] )
 On the Client application, I use cookie http with
 System.Web.SessionState.HttpSessionState and System.Net.CookieContainer
 classes.
 When the web service method uses a session state, a cookie is passed back to the
 Web Service client in the response header. That cookie uniquely identifies the
 session for that Web Service client.
 To receive that cookie for the web service client, a new instance of
 CookieContainer must be created and then assigned to the CookieContainer
 property before the Web service method is called. This make sure that the
 cookie is correctly included in subsequent requests. I must do this because I
 must store the cookies that are received in the session state for future
 retrieval by the session.
 The web services code is:Service1.asmx.cs
 
 using System;
 using System.Collections;
 using System.ComponentModel;
 using System.Data;
 using System.Diagnostics;
 using System.Web;
 using System.Web.Services;
 ...
 ...
 ...
 [ WebMethod(Description=Per session Hit Counter,EnableSession=true)]
   public int SessionHitCounter()  
   {
 if (Session[HitCounter] == null)  
 {
Session[HitCounter] = 1;
 }
 else  
 {
Session[HitCounter] = ((int) Session[HitCounter]) + 1;
 }
 return ((int) Session[HitCounter]);
   }
 
  
 The client application code is:WebForm1.aspx.cs
 
 using System;
 using System.Collections;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
 using System.Web;
 using System.Web.SessionState;
 using System.Web.UI;
 using System.Web.UI.WebControls;
 using System.Web.UI.HtmlControls;
 using System.Net;
 .
 .
   // Create a new instance of a proxy class for your XML Web service.
   private ServerUsage.Service1 su = new ServerUsage.Service1();
   private CookieContainer cookieJar;
 ..
   private void Button1_Click(object sender, System.EventArgs e)
   {

  
 // Check to see if the cookies have already been saved for this session.
 if (Session[CookieJar] == null)  
cookieJar= new CookieContainer();
 else
cookieJar = (CookieContainer) Session[CookieJar];
  
 // Assign the CookieContainer to the proxy class.
 su.CookieContainer = cookieJar;
  
 // Invoke an XML Web service method that uses session state and thus
 cookies.
 int count = su.SessionHitCounter();
  
 // Store the cookies received in the session state for future retrieval by
 this session.
 Session[CookieJar] = cookieJar;
  
 // Populate the text box with the results from the call to the XML Web
 service method.
 Label1.Text = count.ToString();  

  
   }
 
 
 I've mono 1.0 installed. 
 
 Where I mistake?
 
 Could anybody help me, please?
  
 Thanks a lot,
  
 Valentina.
   
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread Daniel Carrera
On Mon, Jul 26, 2004 at 11:02:36AM -0400, Dan Winship wrote:

  Amazing.  I didn't that Gtk itself was ported to Mac OS X.
 
 To clarify, The Gtk X11 backend works under X11 on OS X. There is no
 port that uses CoreGraphics.

Yes, I found that out last night :-(

Not only that, but installation is very non-trivial.  Definitely not 
something for the average Mac user.

And wx.NET would also complicate installation. :-(

I'm going to take a look a Mozilla/XUL and see if that's any better.

Cheers,
-- 
Daniel Carrera | No trees were harmed in the generation of this
PhD student.   | e-mail.  A significant number of electrons were,
Math Dept. UMD | however, severely inconvenienced.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] What Is Most Reliable Mono Install for Fedora Core 2

2004-07-26 Thread Antonio Santana
I am running Fedora Core 2 and was wondering what might be the easiest or 
most reliable method for installing Mono on this Linux Distribution.  I 
added the Mono URL to my yum.conf.  I have installed some packages, but it 
doens't seem like I have all the dependencies required for apps like 
monodevelop.  Thanks in advance for the help.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What Is Most Reliable Mono Install for Fedora Core 2

2004-07-26 Thread Weiqi Gao
Antonio Santana wrote:
I am running Fedora Core 2 and was wondering what might be the easiest 
or most reliable method for installing Mono on this Linux 
Distribution.  I added the Mono URL to my yum.conf.  I have installed 
some packages, but it doens't seem like I have all the dependencies 
required for apps like monodevelop.  Thanks in advance for the help.
I installed Mono 1.0 on Fedora Core 2 using the Yum repository.  I don't 
have any dependency problems.  (I had problems with the betas, but Ducan 
Mak fixed them all.)

What kind of dependencies are you running into?
--
Weiqi Gao
[EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread Dan Winship
On Mon, 2004-07-26 at 19:57 +0100, David Burnett wrote:
 On Mon, Jul 26, 2004 at 11:02:36AM -0400, Dan Winship wrote:
 
Amazing.  I didn't that Gtk itself was ported to Mac OS X.
  
   To clarify, The Gtk X11 backend works under X11 on OS X. There is no
   port that uses CoreGraphics.
 
 And that's going to be a major problem with regards to the OSX community 
 accepting Mono/GTK# apps in IMHO.
 
 The Mac favouring Mono hackers would be doing us a great favour if they 
 could commit some resources to a 'native' OSX GTK port.

'native' here would mean uses Mac-specific API calls to draw Gtk
widgets according to the current Gtk theme. The resulting app would
look *exactly* the same using the native Gtk port as it would using the
X11 Gtk port, it just wouldn't require X11 to be running. I don't think
this would really be any more palatable to mac users than the straight
X11 version.

What the mac-favoring mono hackers *are* doing is working on a set
of .NET bindings for Cocoa (the cocoa-sharp module in mono cvs). This
will let people write C# apps that use the real OS X widgets and look
+feel.

(Alternatively, you could use one of those widget toolkits that
implements a native UI on any platform. But Gtk isn't one of those.)

-- Dan


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread Erik Dasque
My two cents.
There is a GTK# installer coming for MacOS X.
I second David's affirmation though I will modify it slightly:
The Mac favouring Mono hackers would be doing us a great favour if 
they could commit some resources to a 'native' OSX GTK port. The 
current ports are pretty stalled. GTK-OSX is nearly there but is only 
GTK 1.2,
GTK-Quartz didn't get very far at all.
The Mono favoring Mac hackers would be doing us a great favor if they 
could commit some resources to a 'native' OSX GTK port. The current 
ports are pretty stalled.

Or actually, Apple could/should.
Erik
On Jul 26, 2004, at 2:57 PM, David Burnett wrote:
On Mon, Jul 26, 2004 at 11:02:36AM -0400, Dan Winship wrote:
  Amazing.  I didn't that Gtk itself was ported to Mac OS X.

 To clarify, The Gtk X11 backend works under X11 on OS X. There is no
 port that uses CoreGraphics.
And that's going to be a major problem with regards to the OSX 
community accepting Mono/GTK# apps in IMHO.

The Mac favouring Mono hackers would be doing us a great favour if 
they could commit some resources to a 'native' OSX GTK port. The 
current ports are pretty stalled. GTK-OSX is nearly there but is only 
GTK 1.2,
GTK-Quartz didn't get very far at all.

The problem is that porting GTK needs some experienced GTK / X11 
hackers to help out. People who know exactly what events should be 
fired and when.

Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread David Burnett
Dan Winship wrote:
On Mon, 2004-07-26 at 19:57 +0100, David Burnett wrote:
On Mon, Jul 26, 2004 at 11:02:36AM -0400, Dan Winship wrote:
  Amazing.  I didn't that Gtk itself was ported to Mac OS X.

 To clarify, The Gtk X11 backend works under X11 on OS X. There is no
 port that uses CoreGraphics.
And that's going to be a major problem with regards to the OSX community 
accepting Mono/GTK# apps in IMHO.

'native' here would mean uses Mac-specific API calls to draw Gtk
widgets according to the current Gtk theme. 
Yes
The resulting app would
look *exactly* the same using the native Gtk port as it would using the
X11 Gtk port, it just wouldn't require X11 to be running. I don't think
this would really be any more palatable to mac users than the straight
X11 version.
We'll have to disagree on that point. I think that the look and feel 
problem is secondary to the requires X11 problem.
Look and Feel can be worked around to a large degree with a decent port
and an aqua-ish theme. GTK-OSX used native components in a couple of 
area's (buttons and checkboxes) which helps a great deal.

With X11 GTK# you're going to have to explain what
Gtk-WARNING **: cannot open display:
means to a million OSX users and why OSX users need to run
open-x11 mono myapp.exe {I get -bash: open-x11: command not found ??}
or start X11.app (where's that ? / Oh I didn't install that) first
and then run mono myotherapp.exe
That's going to annoy OSX user's that are used to things 'just working',
and put off OSX developers.

(Alternatively, you could use one of those widget toolkits that
implements a native UI on any platform. But Gtk isn't one of those.)
Which is my point, if Ximian / Novell are serious about pushing GTK#
as a primary alternative to the .NET framework with regards to Macs
as well as Linux and Windows then its needs to be 'one of those'.
Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread David Burnett
Erik Dasque wrote:
The Mono favoring Mac hackers would be doing us a great favor if they 
could commit some resources to a 'native' OSX GTK port. The current 
ports are pretty stalled.

Or actually, Apple could/should.
It would be nice wouldn't it, but unlikely unless you know something
the rest of us do not, like Apple have been taking an interest in Mono.
I would guess that Apple would more likely be interested in the cocoa# 
end of things, although their Swing port was above and beyond the call 
of duty :-).

I just think that any Mac coding Mono hackers whether they be Ximian 
employees or the Mono community hackers have the CoreGraphics / X11 / 
GTK knowledge needed to successfully complete a GTK+ port.

Dave

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono DataAdapter problem?

2004-07-26 Thread Agus Surachman





Dear all,

Is there something weird with Mono Data 
Adapter?

My script code as attached below give different 
result if I run using .NET and Mono.
Seems that there is a problem when filling 
DataTable with DataAdapter.
Please your help.

-Aguss



private static string 
p_GetNextSequence(string szPjkCode, string szFtrTypeCode, DateTime 
dtmExtraction){OraDatabase db = new 
OraDatabase();string _debug = 
"";//tambahan 
agusstry{_debug 
= "opening..;";//tamabahn 
agussdb.Open();_debug += 
"beginning...;";//tambahan 
agussdb.Begin();_debug 
+= "getting text command...;";//tambahan aguss

OracleCommand cmd = 
db.GetTextCommand();// 
Check if the counter is already exist in the 
table.// Before getting the row, lock it first so 
that no one can modify it when we work on 
it.// Lock (by updating 
SEQ_NUMBER = SEQ_NUMBER + 1).//

_debug += 
"executing updating sequence command...;";//tambahan aguss

cmd.CommandText = "UPDATE UPLOADER_SEQUENCE SET" 
+ " SEQ_NUMBER = SEQ_NUMBER + 1" + " WHERE" + " LOWER(PJK_CODE) = '" + 
szPjkCode.ToLower() + "'" + " AND FTR_DATE = " + 
DtmDateToOraDateString(dtmExtraction) + " AND LOWER(FTR_TYPE_CODE) = '" + 
szFtrTypeCode.ToLower() + 
"'";_debug += 
cmd.CommandText + "...;";

cmd.ExecuteNonQuery();// 
Read the row to check if the counter is already exist in the 
table.//cmd.CommandText 
= "SELECT SEQ_NUMBER" + " FROM UPLOADER_SEQUENCE" + " WHERE" + " LOWER(PJK_CODE) 
= '" + szPjkCode.ToLower() + "'" + " AND FTR_DATE = " + 
DtmDateToOraDateString(dtmExtraction) + " AND LOWER(FTR_TYPE_CODE) = '" + 
szFtrTypeCode.ToLower() + "'";

_debug += 
"creating data 
adapater...;";_debug 
+= cmd.CommandText + "...;";OracleDataAdapter da = new 
OracleDataAdapter(cmd);DataTable dt = new 
DataTable();

_debug += 
"filling data adapter...;";

da.Fill(dt);int 
iNextSeqNo;_debug +="nilai 
Rows dari data adapter: " + dt.Rows.Count + 
"...;";if 
(dt.Rows.Count == 0){

// If 
counter not found, create (also set the SEQ_NUMBER = 
1).cmd.CommandText = "INSERT INTO 
UPLOADER_SEQUENCE (" + " PJK_CODE," + " FTR_DATE," + " FTR_TYPE_CODE," + " 
SEQ_NUMBER" + " ) VALUES (" + " '" + szPjkCode + "'," + " " + 
DtmDateToOraDateString(dtmExtraction) + "," + " '" + szFtrTypeCode + "'," + " 1" 
+ " )";

_debug += "inserting into uploader 
sequence:..." + cmd.CommandText + 
";";cmd.ExecuteNonQuery();iNextSeqNo 
= 
1;}else{// 
If found, return the counter.// No need to 
check if SEQ_NUMBER is null or not (it must not be 
null!).iNextSeqNo = 
System.Convert.ToInt32(dt.Rows[0]["SEQ_NUMBER"]);} 
// 
dt.Rows.Count.db.Commit();//return 
iNextSeqNo;return "next sequence: " + 
iNextSeqNo.ToString() + "; " + 
_debug;}catch(Exception 
exp){//tambahan 
agussreturn ("Error get sequence: " + _debug + " " + 
exp.Message);//tambahan 
aguss}//tambahan 
agussfinally{db.Close();}}



Output from .NET:

opening..;beginning...;getting text 
command...;executing updating sequence command...;UPDATE UPLOADER_SEQUENCE SET 
SEQ_NUMBER = SEQ_NUMBER + 1 WHERE LOWER(PJK_CODE) = 'ppatk' AND FTR_DATE = 
TO_DATE('27-7-2004', 'DD-MM-') AND LOWER(FTR_TYPE_CODE) = 'c'...;creating 
data adapater...;SELECT SEQ_NUMBER FROM UPLOADER_SEQUENCE WHERE LOWER(PJK_CODE) 
= 'ppatk' AND FTR_DATE = TO_DATE('27-7-2004', 'DD-MM-') AND 
LOWER(FTR_TYPE_CODE) = 'c'...;filling data adapter...;nilai Rows dari data adapter: 1...;


Output from Mono

opening..;beginning...;getting text 
command...;executing updating sequence command...;UPDATE UPLOADER_SEQUENCE SET 
SEQ_NUMBER = SEQ_NUMBER + 1 WHERE LOWER(PJK_CODE) = 'ppatk' AND FTR_DATE = 
TO_DATE('27-7-2004', 'DD-MM-') AND LOWER(FTR_TYPE_CODE) = 'c'...;creating 
data adapater...;SELECT SEQ_NUMBER FROM UPLOADER_SEQUENCE WHERE LOWER(PJK_CODE) 
= 'ppatk' AND FTR_DATE = TO_DATE('27-7-2004', 'DD-MM-') AND 
LOWER(FTR_TYPE_CODE) = 'c'...;filling data adapter...;nilai Rows dari data adapter: 0...;


  
  
  ---Outgoing mail is certified Virus Free.Checked by AVG 
  anti-virus system (http://www.grisoft.com).Version: 6.0.726 
  / Virus Database: 481 - Release Date: 7/22/2004


[Mono-list] Re: Mono DataAdapter problem?

2004-07-26 Thread Agus Surachman



Dear all,

Is there something weird with Mono Data 
Adapter?

My script code as attached below give different 
result if I run using .NET and Mono.
Seems that there is a problem when filling 
DataTable with DataAdapter.
Please your help.

-Aguss



private static string 
p_GetNextSequence(string szPjkCode, string szFtrTypeCode, DateTime 
dtmExtraction){OraDatabase db = new 
OraDatabase();string _debug = 
"";//tambahan 
agusstry{_debug 
= "opening..;";//tamabahn 
agussdb.Open();_debug += 
"beginning...;";//tambahan 
agussdb.Begin();_debug 
+= "getting text command...;";//tambahan aguss

OracleCommand cmd = 
db.GetTextCommand();// 
Check if the counter is already exist in the 
table.// Before getting the row, lock it first so 
that no one can modify it when we work on 
it.// Lock (by updating 
SEQ_NUMBER = SEQ_NUMBER + 1).//

_debug += 
"executing updating sequence command...;";//tambahan aguss

cmd.CommandText = "UPDATE UPLOADER_SEQUENCE SET" 
+ " SEQ_NUMBER = SEQ_NUMBER + 1" + " WHERE" + " LOWER(PJK_CODE) = '" + 
szPjkCode.ToLower() + "'" + " AND FTR_DATE = " + 
DtmDateToOraDateString(dtmExtraction) + " AND LOWER(FTR_TYPE_CODE) = '" + 
szFtrTypeCode.ToLower() + 
"'";_debug += 
cmd.CommandText + "...;";

cmd.ExecuteNonQuery();// 
Read the row to check if the counter is already exist in the 
table.//cmd.CommandText 
= "SELECT SEQ_NUMBER" + " FROM UPLOADER_SEQUENCE" + " WHERE" + " LOWER(PJK_CODE) 
= '" + szPjkCode.ToLower() + "'" + " AND FTR_DATE = " + 
DtmDateToOraDateString(dtmExtraction) + " AND LOWER(FTR_TYPE_CODE) = '" + 
szFtrTypeCode.ToLower() + "'";

_debug += 
"creating data 
adapater...;";_debug 
+= cmd.CommandText + "...;";OracleDataAdapter da = new 
OracleDataAdapter(cmd);DataTable dt = new 
DataTable();

_debug += 
"filling data adapter...;";

da.Fill(dt);int 
iNextSeqNo;_debug +="nilai 
Rows dari data adapter: " + dt.Rows.Count + 
"...;";if 
(dt.Rows.Count == 0){

// If 
counter not found, create (also set the SEQ_NUMBER = 
1).cmd.CommandText = "INSERT INTO 
UPLOADER_SEQUENCE (" + " PJK_CODE," + " FTR_DATE," + " FTR_TYPE_CODE," + " 
SEQ_NUMBER" + " ) VALUES (" + " '" + szPjkCode + "'," + " " + 
DtmDateToOraDateString(dtmExtraction) + "," + " '" + szFtrTypeCode + "'," + " 1" 
+ " )";

_debug += "inserting into uploader 
sequence:..." + cmd.CommandText + 
";";cmd.ExecuteNonQuery();iNextSeqNo 
= 
1;}else{// 
If found, return the counter.// No need to 
check if SEQ_NUMBER is null or not (it must not be 
null!).iNextSeqNo = 
System.Convert.ToInt32(dt.Rows[0]["SEQ_NUMBER"]);} 
// 
dt.Rows.Count.db.Commit();//return 
iNextSeqNo;return "next sequence: " + 
iNextSeqNo.ToString() + "; " + 
_debug;}catch(Exception 
exp){//tambahan 
agussreturn ("Error get sequence: " + _debug + " " + 
exp.Message);//tambahan 
aguss}//tambahan 
agussfinally{db.Close();}}



Output from .NET:

opening..;beginning...;getting text 
command...;executing updating sequence command...;UPDATE UPLOADER_SEQUENCE SET 
SEQ_NUMBER = SEQ_NUMBER + 1 WHERE LOWER(PJK_CODE) = 'ppatk' AND FTR_DATE = 
TO_DATE('27-7-2004', 'DD-MM-') AND LOWER(FTR_TYPE_CODE) = 'c'...;creating 
data adapater...;SELECT SEQ_NUMBER FROM UPLOADER_SEQUENCE WHERE LOWER(PJK_CODE) 
= 'ppatk' AND FTR_DATE = TO_DATE('27-7-2004', 'DD-MM-') AND 
LOWER(FTR_TYPE_CODE) = 'c'...;filling data adapter...;nilai Rows dari data adapter: 1...;


Output from Mono

opening..;beginning...;getting text 
command...;executing updating sequence command...;UPDATE UPLOADER_SEQUENCE SET 
SEQ_NUMBER = SEQ_NUMBER + 1 WHERE LOWER(PJK_CODE) = 'ppatk' AND FTR_DATE = 
TO_DATE('27-7-2004', 'DD-MM-') AND LOWER(FTR_TYPE_CODE) = 'c'...;creating 
data adapater...;SELECT SEQ_NUMBER FROM UPLOADER_SEQUENCE WHERE LOWER(PJK_CODE) 
= 'ppatk' AND FTR_DATE = TO_DATE('27-7-2004', 'DD-MM-') AND 
LOWER(FTR_TYPE_CODE) = 'c'...;filling data adapter...;nilai Rows dari data adapter: 0...;


  
  
  ---Outgoing mail is certified Virus Free.Checked by AVG 
  anti-virus system (http://www.grisoft.com).Version: 6.0.726 
  / Virus Database: 481 - Release Date: 7/22/2004