|
Message:
1
> Date: Fri, 14 Jul 2006 09:12:03 +0200 > From: "AFornes" <[EMAIL PROTECTED]> > Subject: [Firebird-net-provider] fill datagrid in CF > To: <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > I have this code to fill a datagrid from a firebird table. The code works > fine with a desktop PC, but when I compile the code with Compact Framework > it doesn't work (I work with the CF compiled version of FirebirdClient). > Any suggestion?. > > ____________________________________________________________________ > > FbConnection myConnection1 = new FbConnection(connectionString); > > myConnection1.Open(); > > FbDataAdapter Socis = new FbDataAdapter(); > > FbTransaction transaction = myConnection1.BeginTransaction(); > > DataSet ds = new DataSet(); > > Socis.SelectCommand = new FbCommand("SELECT * FROM SOCIOS", myConnection1, > transaction); > > try > > { > > Socis.Fill(ds); > > } > > catch (FbException ex) > > { > > MessageBox.Show(ex.Message); > > } > > this.GridArbre.DataBindings.Add("DataSource", ds, ds.Tables[0].TableName); > > > > Socis.Dispose(); > > myConnection1.Close(); > > _____________________________________________________________________ > > > > Thanks > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://sourceforge.net/mailarchive/forum.php?forum=firebird-net-provider/attachments/20060714/80439e37/attachment.html > > ------------------------------ > > Message: 2 > Date: Fri, 14 Jul 2006 15:57:52 +0200 > From: Carlos Guzm?n ?lvarez <[EMAIL PROTECTED]> > Subject: Re: [Firebird-net-provider] fill datagrid in CF > To: "For users and developers of the Firebird .NET providers" > <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hello: >> >> I have this code to fill a datagrid from a firebird table. The code >> works fine with a desktop PC, but when I compile the code with Compact >> Framework it doesn't work >> > But what is happening ?? it's raising an excepion or not, if it's > raising an exception can you send exception details ?? > > > -- > Carlos Guzm?n ?lvarez > Vigo-Spain Well Carlos the error is raised here : Socis.Fill(ds). When try to fill the dataset. I'm not familiar with VisualStudio 2005 debugging options, but I get a general error of : PlatformNotSupportedException. No se controló System.PlatformNotSupportedException Message="PlatformNotSupportedException" StackTrace: at System.Text.Encoding.GetDataItem() at System.Text.CodePageEncoding..ctor() at System.Text.Encoding.GetEncoding() at System.Text.Encoding.GetEncoding() at FirebirdSql.Data.Common.Charset.GetEncoding() at FirebirdSql.Data.Common.Charset.GetString() at FirebirdSql.Data.Client.Gds.XdrStream.ReadString() at FirebirdSql.Data.Client.Gds.XdrStream.ReadString() at FirebirdSql.Data.Client.Gds.XdrStream.ReadValue() at FirebirdSql.Data.Client.Gds.GdsStatement.ReadDataRow() at FirebirdSql.Data.Client.Gds.GdsStatement.Fetch() at FirebirdSql.Data.FirebirdClient.FbCommand.Fetch() at FirebirdSql.Data.FirebirdClient.FbDataReader.Read() at System.Data.ProviderBase.DataReaderContainer.Read() at System.Data.Common.DataAdapter.FillLoadDataRow() at System.Data.Common.DataAdapter.FillFromReader() at System.Data.Common.DataAdapter.Fill() at System.Data.Common.DbDataAdapter.FillInternal() at System.Data.Common.DbDataAdapter.Fill() at System.Data.Common.DbDataAdapter.Fill() at Proba4.Form1.button1_Click() at System.Windows.Forms.Control.OnClick() at System.Windows.Forms.Button.OnClick() at System.Windows.Forms.ButtonBase.WnProc() at System.Windows.Forms.Control._InternalWnProc() at Microsoft.AGL.Forms.EVL.EnterMainLoop() at System.Windows.Forms.Application.Run() at Proba4.Program.Main() When I inspect the class Socis (the DataAdapter), I can see this expections: 'Socis.SelectComand.ActiveReader.fields.fields[0]. ArrayHandle' produjo una excepción de tipo 'FirebirdSql.Common.Iscexception'. 'Socis.SelectComand.CommandPlan' produjo una excepción de tipo 'System.NullReferenceException. Thanks Carlos. |
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Firebird-net-provider mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
