Hello,

 

I created a simple apllication for Windows Mobile for return any
informations of the simple select command.

The connection to the Firebird server is perfect.

 

Let's consider this simple table

 

CREATE TABLE ENTIDADES (

       COD_ENTIDADE integer NOT NULL,

       DT_DATE date,

       ST_EMAIL varchar(30),

       CONSTRAINT PK_ENTIDADES PRIMARY KEY (COD_ENTIDADE));

 

INSERT INTO ENTIDADES (COD_ENTIDADE, ST_EMAIL) VALUES (1, '01.01.2009',
'[email protected]');

INSERT INTO ENTIDADES (COD_ENTIDADE, ST_EMAIL) VALUES (2, '01.01.2009' ,
'[email protected]');

 

To create a select command with a integer or date column, its works
perfectly as the code below.

 

            FbDataAdapter da = new FbDataAdapter("select cod_entidade,
dt_cadastro from entidades", cn);

 

            DataTable dtEntidades = new DataTable();

 

            da.Fill(dtEntidades);

 

But to the same command using a varchar column as below, I get the following
error in Fill() command.

I noticed that this error occurs only when using a column of type char or
varchar in select command.

 

            FbDataAdapter da = new FbDataAdapter("select st_email from
entidades", cn);

 

            System.PlatformNotSupportedException was unhandled

              Message="PlatformNotSupportedException"

              StackTrace:

                   at System.Text.Encoding.GetDataItem()

                   at System.Text.CodePageEncoding..ctor(Int32 codepage)

                   at System.Text.Encoding.GetEncoding(Int32 codepage)

                   at System.Text.Encoding.GetEncoding(String name)

                   at FirebirdSql.Data.Common.Charset.GetEncoding()

                   at FirebirdSql.Data.Common.Charset.GetString(Byte[]
buffer, Int32 index, Int32 count)

                   at
FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadString(Charset
charset, Int32 length)

                   at
FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadString(Charset
charset)

                   at
FirebirdSql.Data.Client.Managed.Version10.XdrStream.ReadValue(DbField field)

                   at
FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadValue(DbField
field)

                   at
FirebirdSql.Data.Client.Managed.Version10.GdsStatement.ReadDataRow()

                   at
FirebirdSql.Data.Client.Managed.Version10.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(SchemaMapping mapping)

                   at System.Data.Common.DataAdapter.FillFromReader(DataSet
dataset, DataTable datatable, String srcTable, DataReaderContainer
dataReader, Int32 startRecord, Int32 maxRecords, DataColumn
parentChapterColumn, Object parentChapterValue)

                   at System.Data.Common.DataAdapter.Fill(DataTable[]
dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)

                   at System.Data.Common.DbDataAdapter.FillInternal(DataSet
dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)

                   at System.Data.Common.DbDataAdapter.Fill(DataTable[]
dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command,
CommandBehavior behavior)

                   at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable)

                   at RofranColetor.fmEntradaEstoque.BuscaMateriais()

                   at RofranColetor.fmEntradaEstoque.button1_Click(Object
sender, EventArgs e)

                   at System.Windows.Forms.Control.OnClick(EventArgs e)

                   at System.Windows.Forms.Button.OnClick(EventArgs e)

                   at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32
wParam, Int32 lParam)

                   at System.Windows.Forms.Control._InternalWnProc(WM wm,
Int32 wParam, Int32 lParam)

                   at Microsoft.AGL.Forms.EVL.EnterModalDialog(IntPtr
hwnModal)

                   at System.Windows.Forms.Form.ShowDialog()

                   at RofranColetor.fmMain.listView1_ItemActivate(Object
sender, EventArgs e)

                   at System.Windows.Forms.ListView.OnItemActivate(EventArgs
e)

                   at System.Windows.Forms.ListView.HandleItemActivate(Int32
iItem)

                   at System.Windows.Forms.ListView.WnProc(WM wm, Int32
wParam, Int32 lParam)

                   at System.Windows.Forms.Control._InternalWnProc(WM wm,
Int32 wParam, Int32 lParam)

                   at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)

                   at System.Windows.Forms.Application.Run(Form fm)

                   at RofranColetor.Program.Main()

 

This is a bug or a wrong procedure?

 

Regards

 

 

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to