RE: [Mono-list] about Convert class
please also include minimal simple program code to reproduce the error. thanks suresh. >>> Sébastien Pouliot <[EMAIL PROTECTED]> 8/23/2004 9:01:09 PM >>> Please fill a bugzilla (http://bugzilla.ximian.com) entry and include the value of dr.GetValue(0).ToString() in it. Sebastien Pouliot home: [EMAIL PROTECTED] blog: http://pages.infinit.net/ctech/poupou.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of lamyae Benabdeljalil Sent: 23 août 2004 11:13 To: [EMAIL PROTECTED] Subject: [Mono-list] about Convert class I am using mono 1.0, and i have a problem with a lethod of the System.Convert class. My statement is : Hashkey=System.Convert.FromBase64String(dr.GetValue(0).ToString()); i get the following error: Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range. in <0x00098> System.Data.Odbc.OdbcDataReader:GetValue (int) in <0x00054> (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcDataReader:GetValue (int) in <0x003d6> Test:checkkeys () in <0x000cb> Test:Main () Please, can you help me? * ___ 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 ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] about Convert class
This sure looks like you are having an IndexOutOfBoundsException on dr.GetValue(0), and not the Convert. On Mon, 23 Aug 2004 15:12:49 +, lamyae Benabdeljalil <[EMAIL PROTECTED]> wrote: > I am using mono 1.0, and i have a problem with a lethod of the > System.Convert class. My statement is : > Hashkey=System.Convert.FromBase64String(dr.GetValue(0).ToString()); > i get the following error: > Unhandled Exception: System.IndexOutOfRangeException: Array index is out > of range. > in <0x00098> System.Data.Odbc.OdbcDataReader:GetValue (int) > in <0x00054> (wrapper remoting-invoke-with-check) > System.Data.Odbc.OdbcDataReader:GetValue (int) > in <0x003d6> Test:checkkeys () > in <0x000cb> Test:Main () > > Please, can you help me? > * > ___ > 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
[Mono-list] tutorial proxy
I recently did the tutorial on the go-mono website for c# and gtk#, the browser, but I can get the webpage to open up. I am behind a proxy so I think thats part of the problem. Is there anyway I can tell the program to use a proxy? I looked through the Gecko docs and didnt see anything. I've attached to code in case I've made a mistake in it as well Thanks in advance // project created on 08/18/2004 at 22:28 using System; using Gtk; using Glade; using Gecko; public class GladeApp { [Widget] Frame frame1; [Widget] Entry entry1; WebControl web; public static void Main (string[] args) { new GladeApp (args); } public GladeApp (string[] args) { Application.Init(); Glade.XML gxml = new Glade.XML (null, "gui.glade", "window1", null); gxml.Autoconnect (this); web = new WebControl(); web.Show(); frame1.Add(web); entry1.Activated += load_url; Application.Run(); } /* Connect the Signals defined in Glade */ public void OnWindowDeleteEvent (object o, DeleteEventArgs args) { Application.Quit (); args.RetVal = true; } void load_url (object source, EventArgs args ) { Console.WriteLine("Load URL"); web.LoadUrl(entry1.Text); } void go_back (object source, EventArgs args ) { web.GoBack(); Console.WriteLine("Back"); } void go_forward (object source, EventArgs args ) { web.GoForward(); Console.WriteLine("Forward"); } }
[Mono-list] System.Convert.FromBase64String
does the method System.Convert.FromBase64String work with mono? Do you have any idea? ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Mono 1.0.1 late release notes.
Hello, These are the Mono 1.0.1 Late Release Notes. Miguel.Mono 1.0.1 Release Notes For detailed information about Mono, please see the Mono 1.0 release notes. Mono 1.0.1 is a maintenance release release for the 1.0 series of the Mono runtime. The Mono 1.0.xx series is the edition of stable releases of the Mono runtime. Changes since the Mono 1.0 release The following is a description of the changes and bug fixes since the Mono 1.0 release. In particular you should note that the ASP.NET hosting with Apache and XSP has greatly improved and is more robust than the versions that shipped with 1.0, people using ASP.NET are encouraged to upgrade. Configuration Fixes trunc check on Solaris, add SPARC64 defines (Zoltan Varga). Fixes #60787: Libgdiplus pthreads check (Jordi Mas). Apply patch for libgc support on NetBSD. Changes for FreeBSD thread support from John Merryweather Cooper. Runtime Fixes #61033: Handle returning delegates from a delegate (Zoltan Varga). Fixes #61048: Initialize FilterTypeName[IgnoreCase] (Zoltan Varga). Fix linking of basic blocks in branch->branch optimizations (Zoltan Varga). Fixes crash on AMD64 using the Mono interpreter (Marcin Krzyzanowski). Add support for unaligned access on little endian machines (Marcin Krzyzanowski). Fixes 60887: Make named mutex shareable (Dick Porter). Fixes #58844: InvokeMember failed in some cases (Geoff Norton). Fixes #58863: handle some cordner cases (Zoltan Varga) Fixes #61167: String.Replace was too slow (Dick Porter). Fixes #61287: Return proper name from System.Reflection.Module.ToString () (Paolo Molaro). Return real method name on some exception stack traces (Gonzalo Paniagua). PowerPC fix for arguments on stack (no bug reported) (Paolo Molaro, Neale Ferguson). Fixes #61721, #61802: Hashtable's intenral variable renamed for compatibility (Duncan Mak, Geoff Norton). Fixes #61418: Dick Porter. Fixes WebProxy detection (Konstantin Triger). Fix class loads for pointer types (Paolo Molaro). Debugging information bug fix for big-endian machines (Geoff Norton). Track line number information on PPC, s390 and SPARC (Geoff Norton). Fixes #61458: locale compare on invariant culture (Dick Porter) PowerPC bug fixes to register allocation, which closes all known bugs with ASP.NET (Paolo Molaro). GC warnings now use g-log to control them (Paolo Molaro). ADO.NET Fixed reader problem in OdbcCommand's ExecuteScalar (Sureshkumar). Fixed transaction and allow Close to be called multiple times in OdbcCommand (Sébastien Robitaille). DataContainer checks for null in SetItemForDataRecord (Aleksey Demakov). Fixes #61203: Failure with 64 bit numbers when reading from SqlServer (Umadevi). Fixes #58163: DbDataRecord: Return DBNull instead of Null (Umadevi). Fixes DataSet to XML serialization (Atsushi Enomoto). Fixes #61968: Fixes quoted arguments to OdbcParameter's (Umadevi). Fixes #62046: ExecuteNonQuery implemented correctly (Umadevi). ASP.NET Added support for tracing on pages (David Taylor, Gonzalo Paniagua). Now creates the assemblies in the DynamicBase directory (Gonzalo Paniagua). Fixes #61232: Do not keep session around if obtained from the context (Gonzalo Paniagua). Fixes #61218: Problem redirecting from https to http (Gonzalo Paniagua). Added workaround for postback on Netscape 4.xx (Gonzalo Paniagua). Fix crash on XSP when $HOME was not set (use GetFolderPath instead of using HOME) (Gonzalo Paniagua). Fixes #61569: Do not include private properties/events when hoooking up (Gonzalo Paniagua). Fixes #61429: case-sensitive fixes (Gonzalo Paniagua). Fixes #61690: Use invariant when formatting expiration date (Gonzalo Paniagua). Fixes #61654: Dont pass double slash when path begins with a tilde (Gonzalo Paniagua). Fixes #61524, 61831 (Gonzalo Paniagua). WebClientProtocol adds the cookies as soon as they are available (Lluis Sánchez) Remoting Fixes #60934: Cant setup remoting sink providers in config file (Lluis Sánchez) Fixes #60427: SoapFormatter was using a differnent way of encoding argument names (Lluis Sánchez). Fixes #61592: Set channel name for provided properties (Lluis Sánchez). Fixes #61774, 61249, 61837: (LLuis Sánchez). System.Drawing Fixes #61050: Report.Net fails in Mono (Jordi Mas). Fixes #61156: Some PNG images were corrupted, and also adds a performance improvement (Ravindra Kumar). Fixes to #60386, #60663, #61414: clipping (Ravindra Kumar). System.IO File.Move needs to check that the destination files does not exist (Dick Porter, Carlos Alberto). Include the file name on FileNotFoundExceptions (Dick Porter, Carlos Alberto). Fixes #60970: Check for underflow when converting Unix time_t values (Dick Porter). Fixes #61131: Fixes support FileStream
RE: [Mono-list] about Convert class
Please fill a bugzilla (http://bugzilla.ximian.com) entry and include the value of dr.GetValue(0).ToString() in it. Sebastien Pouliot home: [EMAIL PROTECTED] blog: http://pages.infinit.net/ctech/poupou.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of lamyae Benabdeljalil Sent: 23 août 2004 11:13 To: [EMAIL PROTECTED] Subject: [Mono-list] about Convert class I am using mono 1.0, and i have a problem with a lethod of the System.Convert class. My statement is : Hashkey=System.Convert.FromBase64String(dr.GetValue(0).ToString()); i get the following error: Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range. in <0x00098> System.Data.Odbc.OdbcDataReader:GetValue (int) in <0x00054> (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcDataReader:GetValue (int) in <0x003d6> Test:checkkeys () in <0x000cb> Test:Main () Please, can you help me? * ___ 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
[Mono-list] about Convert class
I am using mono 1.0, and i have a problem with a lethod of the System.Convert class. My statement is : Hashkey=System.Convert.FromBase64String(dr.GetValue(0).ToString()); i get the following error: Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range. in <0x00098> System.Data.Odbc.OdbcDataReader:GetValue (int) in <0x00054> (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcDataReader:GetValue (int) in <0x003d6> Test:checkkeys () in <0x000cb> Test:Main () Please, can you help me? * ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Problem with a web serivce method.
On Mon, 2004-08-23 at 15:08, [EMAIL PROTECTED] wrote: > Isql is an utility of unixODBC > Er yes, but I meant a c# example that run at the console and not a webservice. It will probably be enough to do just: using System; using System.Data; class Foo { public static void Main() { OdbcConnection conn = new OdbcConnection("DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;"); conn.Open(); } } ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Problem with a web serivce method.
Isql is an utility of unixODBC --- [EMAIL PROTECTED] root]# isql tdmio root rootpwd +---+ | Connected!| | | | sql-statement | | help [tablename] | | quit | | | +---+ SQL> select * from sessione; +---+-+---+-+---+ | CodiceSessione| Problema| Stato | Nome| Utente| +---+-+---+-+---+ | 1 | 1 | chiusa| Null| U1| | 2 | 1 | chiusa| Null| U1| | 3 | 1 | chiusa| Null| U1| | 4 | 1 | chiusa| Null| U4| | 5 | 1 | chiusa| Null| U1| | 6 | 1 | chiusa| Null| U4| | 7 | 1 | chiusa| Null| U5| | 8 | 1 | chiusa| Null| U4| | 9 | 1 | chiusa| Null| U1| | 10| 1 | chiusa| Null| U1| | 11| 1 | chiusa| Null| U1| | 12| 1 | Attiva| Null| U1| +---+-+---+-+---+ SQLRowCount returns 12 12 rows fetched SQL> select * from sessione where Utente = 'U1' and Stato='Attiva'; +---+-+---+-+---+ | CodiceSessione| Problema| Stato | Nome| Utente| +---+-+---+-+---+ | 12| 1 | Attiva| Null| U1| +---+-+---+-+---+ SQLRowCount returns 1 1 rows fetched SQL> -- In the code the value of "Utente" is passed by a session var "(string)Session["Utente"]" but the query is the same. Valentina. >Scrive Jonathan Stowe <[EMAIL PROTECTED]>: > On Mon, 2004-08-23 at 13:43, [EMAIL PROTECTED] wrote: > > > > > "The remote server returned an error: (500) Internal Server Error. > > Unable to retreive error information from ODBC driver manager" > > > > What it means? > > > > There is a problem with your ODBC configuration, can you make a small > console example that just attempts to do the same connection to the > database? > > /J\ > > ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Problem with asp.net web application
Hi, I've an asp.net web application that shows, through an odbc connection to a mysql database, the content of the table chosen from a DropDownList. The code go well on windows but on linux with mono 1.01 not all the tables are shown correctly. Could anybody help me? web application : WebForm1VisuaTabelle.aspx, WebForm1.VisuaTabelle.aspx.cs dump db mysql : tdmio.txt thanks, Valentina.# MySQL-Front Dump 2.5 # # Host: localhost Database: tdmio # # Server version 4.1.3b-beta-nt # # Table structure for table 'gruppi' # DROP TABLE IF EXISTS `gruppi`; CREATE TABLE `gruppi` ( `CodiceGruppo` varchar(4) NOT NULL default '0', `Nome` varchar(15) default 'Null', `Descrizione` varchar(25) default 'Null', PRIMARY KEY (`CodiceGruppo`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; # # Dumping data for table 'gruppi' # INSERT INTO `gruppi` (`CodiceGruppo`, `Nome`, `Descrizione`) VALUES("G1", "Pianificatori", "Utenti Pianificatori"); INSERT INTO `gruppi` (`CodiceGruppo`, `Nome`, `Descrizione`) VALUES("G2", "Altri", "Altri utenti"); INSERT INTO `gruppi` (`CodiceGruppo`, `Nome`, `Descrizione`) VALUES("G3", "Amministrativi", "Addetti Amministrazione"); # # Table structure for table 'ordini' # DROP TABLE IF EXISTS `ordini`; CREATE TABLE `ordini` ( `Problema` char(4) NOT NULL default '0', `CodiceOrdine` int(4) NOT NULL default '0', `CurSessione` int(4) default '0', `Data` date default NULL, PRIMARY KEY (`CodiceOrdine`,`Problema`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; # # Dumping data for table 'ordini' # INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "1", "0", "-00-00"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "2", "0", "-00-00"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "3", "11", "-00-00"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "4", "11", "2004-07-29"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "5", "11", "2004-07-31"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "6", "10", "2004-08-05"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "7", "10", "2004-07-28"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "8", "0", "2004-07-29"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "9", "0", "2004-08-05"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "10", "0", "2004-08-05"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "11", "0", "2004-07-30"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "12", "0", "2004-08-10"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "13", "0", "2004-08-14"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "14", "0", "2004-08-16"); INSERT INTO `ordini` (`Problema`, `CodiceOrdine`, `CurSessione`, `Data`) VALUES("1", "15", "0", "2004-08-07"); # # Table structure for table 'problemi' # DROP TABLE IF EXISTS `problemi`; CREATE TABLE `problemi` ( `CodiceProblema` varchar(4) NOT NULL default '0', `Nome` varchar(10) default 'Null', `Data` date default NULL, PRIMARY KEY (`CodiceProblema`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; # # Dumping data for table 'problemi' # INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES("1", "Problema1", "2004-08-17"); INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES("2", "Problema2", "2004-08-09"); INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES("3", "Problema3", "2004-08-07"); INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES("4", "Problema4", "2004-08-08"); INSERT INTO `problemi` (`CodiceProblema`, `Nome`, `Data`) VALUES("5", "Problema5", "2004-08-10"); # # Table structure for table 'sequenze' # DROP TABLE IF EXISTS `sequenze`; CREATE TABLE `sequenze` ( `CodiceViaggio` int(5) NOT NULL default '0', `Problema` char(4) NOT NULL default '0', `Sequenza` char(4) NOT NULL default 'Null', `ProblemaOrdine` char(4) default '0', `CodiceOrdine` char(4) NOT NULL default 'Nul', PRIMARY KEY (`CodiceViaggio`,`Problema`,`Sequenza`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; # # Dumping data for table 'sequenze' # INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, `CodiceOrdine`) VALUES("1", "1", "Null", "0", "7"); INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, `CodiceOrdine`) VALUES("3", "1", "Null", "0", "6"); INSERT INTO `sequenze` (`CodiceViaggio`, `Problema`, `Sequenza`, `ProblemaOrdine`, `CodiceOrdine`) VALUES("4", "1", "Null", "0", "3"); INSERT
RE: [Mono-list] Beginner C# Book
Tom, Welcome to the journey that is C# and the .NET framework! I found the book "C# Primer Plus", by Klaus Michelsen, excellent for those new to C# and OOP: http://www.amazon.com/exec/obidos/ASIN/0672321521/qid=1093265707/sr=ka-1/ref =pd_ka_1/104-4273990-8750300 It assumes no prior OOP language experience and it focuses on the C# language and syntax without the distraction of delving too deep into the extended .NET framework classes, which is a much bigger topic better left for other books. Also, no need for Visual Studio.NET, you should be able to use your favorite text editor or IDE and Mono with the program examples just fine. Sharpdevelop(monodevelop on *nix), for instance, is excellent. After this book, I dug into "Programming C#" by Jesse Liberty, then "Professional C#, Second Edition" by Simon Robinson, then "Applied .NET Framework Programming" by Jeffrey Richter and finally "Programming .NET Components" by Juval Lowey. You will find some overlap in these books, but that's to be expected. In my opinion, they are all top titles, and I still use them quite a bit. Some of them mention the use of VS.NET but do not require it. There are many, many other reference books for specific topics like ADO.NET, ASP.NET. Windows Forms, etc, but avoid the temptation to veer off into those areas until you are comfortable with C# and the standard .NET framework classes first. I made that mistake and started spinning my wheels until I went back and finished learning the basics first. ;-) Regards, Dan Maltes -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom McLaughlin Sent: Sunday, August 22, 2004 6:39 PM To: [EMAIL PROTECTED] Subject: [Mono-list] Beginner C# Book Hi all, I'm looking for a good beginner C# book. Preferably one that does not assume a certain amount of familiarity with C++, Java, or OOP in general. I picked up "Mono: A Developers Notebook" from O'Reilly figuring that some of the C++ I saw in school would come back to me. What I saw in school was nearly five years ago and it's definitely not coming back. I really need a book that will not only go over the syntax and structure of the language but the underlying fundementals of the language. (Like not just how to create a vector but what each part of the declaraion means and how it all works.) Right now I maintain the FreeBSD port for Muine and I am looking at creating ports of other applications. I would like to have enough familiarity with the language to fix bugs, especially FreeBSD specific bugs in programs. If someone could recommend a book they found to give a good comprehensive understanding of the language to a beginner that would be great. Thanks. Tom ___ 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] Problem with a web serivce method.
On Mon, 2004-08-23 at 13:43, [EMAIL PROTECTED] wrote: > > "The remote server returned an error: (500) Internal Server Error. > Unable to retreive error information from ODBC driver manager" > > What it means? > There is a problem with your ODBC configuration, can you make a small console example that just attempts to do the same connection to the database? /J\ ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Problem with a web serivce method.
Hi, I've a web service example, called Service1.asmx, that contains four methods. The example works well on Windows, but when I try to execute it on Mono I have some problems , particularly when I invoke the "SessioneAttiva" method, I obtain this error: "The remote server returned an error: (500) Internal Server Error. Unable to retreive error information from ODBC driver manager" What it means? Please help me. I've Fedora Core 2, Mono 1.01 and I use a mysql database (4.1.3-beta-standard) via unixOdbc (2.2.8). Thanks, Valentina. using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; using System.Data.Odbc; namespace ServiceTdProva { public class Service1 : System.Web.Services.WebService { public Service1() { InitializeComponent(); } #region Component Designer generated code private IContainer components = null; private void InitializeComponent() { } protected override void Dispose( bool disposing ) { if(disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } #endregion string DataOdierna=DateTime.Today.Year.ToString() +"-"+ DateTime.Today.Month.ToString() +"-"+ DateTime.Today.Day.ToString(); public string CatchProblema() { string problema="0"; //OdbcConnection conn = new OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};"+"SERVER=localhost;"+"DATABASE=TdMio;"+"UID=root;"+"PASSWORD=rootpwd;"); OdbcConnection conn = new OdbcConnection ("DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;"); OdbcDataReader dbReader = null; conn.Open(); OdbcCommand cmd = conn.CreateCommand(); cmd.CommandText = "Select CodiceProblema from problemi where Data='"+DataOdierna+"'"; dbReader = cmd.ExecuteReader(); while(dbReader.Read()) { problema =(string)dbReader["CodiceProblema"]; } dbReader.Close(); conn.Close(); return problema; } [WebMethod (EnableSession=true)] public string LogIn(string UserIdInput, string PasswordInput) { //OdbcConnection conn = new OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};"+"SERVER=localhost;"+"DATABASE=TdMio;"+"UID=root;"+"PASSWORD=rootpwd;"); OdbcConnection conn = new OdbcConnection ("DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;"); OdbcDataReader dbReader = null; conn.Open(); OdbcCommand cmd = conn.CreateCommand(); cmd.CommandText = "Select * from utenti where UserID='"+UserIdInput+"' and Password='"+PasswordInput+"'"; dbReader = cmd.ExecuteReader(); if(dbReader.Read()) { string Gruppo = (string)dbReader["Gruppo"]; string Utente = (string)dbReader["CodiceUtente"]; Session.Add("Utente",Utente); Session.Add("Gruppo",Gruppo); dbReader.Close(); conn.Close(); return (string)Session["Gruppo"]; } else { dbReader.Close(); conn.Close(); return "Errore"; } } /*##*/ [WebMethod (EnableSession=true)] public void LogOut() { Session.RemoveAll(); } /*##*/ [WebMethod (EnableSession=true)] public string NuovaSessione() { string problema = CatchProblema(); int massimo=0; //Se l'utente �stato indentificato ed �un pianificatore allora pu�aprire una nuova sessione if ((Session["Utente"]!= null)&((string)Session["Gruppo"]=="G1")) { //controllo che l'utente non abbia gi�una sessione attiva //OdbcConnection conn = new OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};"+"SERVER=localhost;"+"DATABASE=tdmio;"+"UID=root;"+"PASSWORD=rootpwd;"); OdbcConnection conn = new OdbcConnection ("DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;"); OdbcDataReader dbReader = null; conn.Open(); OdbcCommand cmd = conn.CreateCommand(); cmd.CommandText = "Select * from sessione where Utente ='"+(string)Session["Utente"]+"'and Stato='Attiva'"; dbReader = cmd.ExecuteReader(); if(dbReader.Read()) { //si allora comunico l'errore perch�non possono essere contemporaneamente attive 2 sessioni string stringa="l'utente" +(string)Session["Utente"]+ "ha gi�una sessione attiva, non �possibile aprirne altre!"; dbReader.Close(); conn.Close(); return stringa; } else { //no allora apro una nuova sessione dbReader.Close(); conn.Close(); OdbcConnection con =null; OdbcConnection connessione=null; //con = new OdbcConnection("DRIVER={MySQL ODBC 3.51 Driver};"+"SERVER=localhost;"+"DATABASE=tdmio;"+"UID=root;"+"PASSWORD=rootpwd;"); con = new OdbcConnection ("DRIVER=MySQL;SERVER=localhost;DATABASE=tdmio;UID=root;PASSWORD=rootpwd;"); con.Open(); OdbcCommand command = con.C
Re: [Mono-list] Beginner C# Book
> >>> I'm looking for a good beginner C# book. Preferably one that does not > >>> assume a certain amount of familiarity with C++, Java, or OOP in > >>> general. I picked up "Mono: A Developers Notebook" from O'Reilly > >>> figuring that some of the C++ I saw in school would come back to me. > >>> What I saw in school was nearly five years ago and it's definitely not > >>> coming back. check http://www.eckelobjects.com/ in case he's released "Thinking in C#" for free (had written he was planning to make such a book) as he had done for "Thinking in C++" and "Thinking in Java" in the past. Very nice books for learning an OOP language, esp. the Java one I had partially read... I loved it. - George Birbilis ([EMAIL PROTECTED]) http://www.kagi.com/birbilis -- ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Beginner C# Book
Hi, > You might want to check out "Programming C#" by Jesse Liberty, 3rd edition, > pub. O'Reilly, ISBN 0-596-00489-3. > > The 3rd edition has complete coverage of .NET 1.1 and in this edition they > added VS.NET 2003, but not too much (50 pages out of 700 something). > > I would recommend it to anyone. Learning C#, Liberty http://www.accu.org/bookreviews/public/reviews/l/l003354.htm Programming C#, Liberty http://www.accu.org/bookreviews/public/reviews/p/p003468.htm I can't remember which one I liked better, they're both cracking books. I'd still recommend Mono : A developer's handbook as the 2nd or 3rd book you should read. TTFN Paul -- "If I face my God tomorrow, I can tell Him I am innocent. I've never harmed anyone. I have cheated no one. I have deceived no one. I have hurt no one. Except myself. And that He will forgive me." - Hans Holzel signature.asc Description: This is a digitally signed message part
Re: [Mono-list] Problem using p/invoke on mono 1.0.1
I think that the problem has to do with some changes that were made to Mono regarding its handling of strings as return types from P/Invoke method. Behind the scenes, a char* is being returned, and the runtime converts the char* into a System.String. In addition, MS.NET calls CoTaskFree() on the char*. At one time Mono did not do this, but for compatibility with MS.NET, its behavior changed. Apparently, libcrypt does not want user to free the pointer that crypt() returns. The work-around for this is to have your method return an IntPtr and then convert the IntPtr to a string manually. For example, use the following in the place of your WriteLine() statement: string encrypted = Marshal.PtrToStringAnsi(UnixCrypt(arg,arg)); Console.WriteLine("UnixEncrypting {0} : {1}",arg,encrypted); > I am trying to use libcrypt.so.2.3.2 with c#. This code has been working > for quite a while but stopped to work now. > > here is a little sample program I wrote > > > using System; > using System.Text; > using System.Security.Cryptography; > using System.Web.Security; > using System.Runtime.InteropServices; > > > > namespace CryptTest > { > class CryptTest > { > [DllImport ("crypt", EntryPoint="crypt", SetLastError=true)] > private static extern string UnixCrypt(string text, string salt); > > [STAThread] > static void Main(string[] args) > { > Console.WriteLine("have {0} args",args.Length); > string arg = args[0]; > Console.WriteLine("UnixEncrypting {0} : > {1}",arg,UnixCrypt(arg,arg)); > } > } > } > > > When I try to run this with > > mono encrypt.exe rainer > > I get a NullReference Exception. I am a bit lost here since this code has > been working beautifully for months. Either my debian upgraded its > libcrypt version (which could easily be true) or upgrading to mono-1.0.1 > introduced the problem (which is less likely since I remember having the > same issue on mono-1.0). ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Beginner C# Book
You might want to check out "Programming C#" by Jesse Liberty, 3rd edition, pub. O'Reilly, ISBN 0-596-00489-3. The 3rd edition has complete coverage of .NET 1.1 and in this edition they added VS.NET 2003, but not too much (50 pages out of 700 something). I would recommend it to anyone. Its a great book for a beginner and a pro. It has all basic coverage On 8/22/04 4:57 PM, "Tom McLaughlin" <[EMAIL PROTECTED]> wrote: > Hi Peter, one thing pointed out to me off list is that I need to be > aware that many C# books are geared towards the MS platform and will > spend a lot of time on Windows Forms and the Visual Studio .NET tools. > Is that the case with "Learning C#"? Thanks. > > Tom > > On Sun, 2004-08-22 at 17:36 -0600, Peter Dennis Bartok wrote: >> O'Reilly : "Learning C#" it teaches from the ground up, and then O'Reilly's >> "Programming C#", which introduces you to things like ASP.Net and SWF. >> >> Peter >> >> >> -Original Message- >> From: "Tom McLaughlin" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Date: Sunday, 22 August, 2004 16:39 >> Subject: [Mono-list] Beginner C# Book >> >> >>> Hi all, >>> >>> I'm looking for a good beginner C# book. Preferably one that does not >>> assume a certain amount of familiarity with C++, Java, or OOP in >>> general. I picked up "Mono: A Developers Notebook" from O'Reilly >>> figuring that some of the C++ I saw in school would come back to me. >>> What I saw in school was nearly five years ago and it's definitely not >>> coming back. >>> >>> I really need a book that will not only go over the syntax and structure >>> of the language but the underlying fundementals of the language. (Like >>> not just how to create a vector but what each part of the declaraion >>> means and how it all works.) Right now I maintain the FreeBSD port for >>> Muine and I am looking at creating ports of other applications. I would >>> like to have enough familiarity with the language to fix bugs, >>> especially FreeBSD specific bugs in programs. >>> >>> If someone could recommend a book they found to give a good >>> comprehensive understanding of the language to a beginner that would be >>> great. Thanks. >>> >>> Tom >>> >>> ___ >>> 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 ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list