Informix + Ole Db extrange problem
Posted in 2004
This is a multi-part message in MIME format. --------------080106050607030202040902 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi All, A contractor of our company has been receiving the following error message while trying to insert data(150 bytes) into a byte column of an informix table: E_OUTOFMEMORY(0x8007000E) He is using Visual Studio .NET (2003) and C# and Ole.DB. Informix database is IDS 9.3 9.30.HC2W8 running on HP-UX 11.0. The clients used were: Windows 2000(SP6) with .Net framework installed, Client connect2.80tc1 Windows XP(SP1) with .Net framework installed, Client connect2.80tc1 The confusing part is that when he try to insert a null into the byte column it works and no error message is returned, but when he try to insert one-byte or two-byte... or 150-byte, etc; he get the E_OUTOFMEMORY error. Previosuly he inserted data in the same table with ODBC with no problem but now that he is using Ole.Db the inserts to byte columns are not working properly. Other problem is that no much information is given when the insert fails in the exception mechanism of C#... Attached is an extract of the code : problemcod.cs And the esxception trace : trace.txt Is there any configuration related to Ole.DB in the server that I must take care of? Any help would be very appreciated. -- Atte, Jesus Antonio Santos Giraldo ----------------------------------- jeansagi@myrealbox.com jeansagi@netscape.net --------------080106050607030202040902 Content-Type: text/plain; name="problemcode.cs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="problemcode.cs" protected void CargarObjetoBlobServer() { if( this.dataSetEjecutaTransferencia1.AV_TRANSFSOPBLO.Rows.Count < 1 ) return; byte[] MyData= new byte[150]; System.Data.OleDb.OleDbConnection oleDbConnectionObj = null; System.Data.OleDb.OleDbCommand oleDbCommand1; if( !SeguridadSistema.ConectarseBaseDatos(ref oleDbConnectionObj) ) { this.DesplegarMensajeColorearTextBoxSemaforo( EstadosSemaforo.SemaforoRojo, "Error al momento de transferir " + "los datos hacia la tabla destino, Error: Imposible conectarse a la " + "base de datos"); this.AdicionarRegistroMensajes(this.textBoxMensaje.Text); return; } try { oleDbCommand1 = new System.Data.OleDb.OleDbCommand(); oleDbCommand1.Connection = oleDbConnectionObj; oleDbCommand1.CommandType = CommandType.Text; oleDbCommand1.CommandText = "UPDATE AV_TRANSFSOPBLO SET CAMPSOPO = ? WHERE CODEJECU = " + this.dataSetEjecutaTransferencia1.AV_TRANSFSOPORT. Rows[0]["CODEJECU"].ToString(); oleDbCommand1.Parameters.Add( new System.Data.OleDb.OleDbParameter( "CAMPSOPO", System.Data.OleDb.OleDbType.Binary, 150, System.Data.ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, MyData)); MessageBox.Show("paso 1 "); oleDbCommand1.ExecuteNonQuery(); /*MessageBox.Show("paso 2 "); foreach(ListViewItem item in this.listViewSoporte.Items) { try { if( oleDbCommandTempo.ExecuteNonQuery() < 1 ) item.ImageIndex = SeguridadSistema.IMGWARNINGREGISTRO; } catch(Exception ex) { MessageBox.Show(ex.Message); item.ImageIndex = SeguridadSistema.IMGWARNINGREGISTRO; } }*/ } catch(Exception ex) { this.DesplegarMensajeColorearTextBoxSemaforo( EstadosSemaforo.SemaforoRojo, "Imposible transferir los datos " + "hacia la tabla destino, Error: " + ex.Message + " -- " + ex.Source + " -- " + ex.StackTrace + ex.ToString() ); this.AdicionarRegistroMensajes(this.textBoxMensaje.Text); } oleDbConnectionObj.Close(); } --------------080106050607030202040902 Content-Type: text/plain; name="trace.txt" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="trace.txt" Imposible transferir los datos hacia la tabla destino, Error: La informaci'n del error no est' disponible: E_OUTOFMEMORY(0x8007000E). -- -- at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at COSTOSABC.EjecutaTransferencia.CargarObjetoBlobServer() in c:\\costosabc\\costosabc\\ejecutatransferencia.cs:line 1701System.Data.OleDb.OleDbException: La informaci'n del error no est' disponible: E_OUTOFMEMORY(0x8007000E). at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at COSTOSABC.EjecutaTransferencia.CargarObjetoBlobServer() in c:\\costosabc\\costosabc\\ejecutatransferencia.cs:line 1701 --------------080106050607030202040902 Content-Type: text/x-vcard; charset=utf8; name="jeansagi.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jeansagi.vcf" begin:vcard fn:Jesus Antonio Santos Giraldo n:Santos Giraldo;Jesus Antonio org;quoted-printable:Fundacion Clinica Valle del Lili;Inform=C3=A1tica adr:;;Cra 76A # 8 - 34;Cali;Valle del Cauca;Valle;Colombia email;internet:jeansagi@myrealbox.com title:Analista de sistemas tel;work:+57(2)3317474 +57(2)3319090 Ext. 3130 o 3102 tel;fax:+57(2)3316728 tel;home:+57(2)3396928 tel;cell:+57(315)5264177 x-mozilla-html:FALSE url:http://www.fcvl.org version:2.1 end:vcard --------------080106050607030202040902-- sending to informix-list