Skip to Content
0
Former Member
Jun 08, 2009 at 02:30 PM

Fill DataBase with Matrix Rows

32 Views

I want to put in my database some informations from my Matrix.

I´m use the next coding. I don´t recieve nothing message with errors, but nothing information was save in my database.

Regards,

Juliano

string ServGroup = null;

string TpGroup = null;

Matrix oMatrix = (Matrix)oForm.Items.Item(matrix).Specific;

try

{

ServGroup = System.Convert.ToString(oDataTable.GetValue(1, 0));

TpGroup = ((ComboBox)(oMatrix.Columns.Item("U_ServType").Cells.Item(_eventoItem.Row).Specific)).Selected.Value;

}

catch (Exception ex)

{

company.Application.StatusBar.SetText("Erro " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

return false;

}

oMatrix.GetLineData(_eventoItem.Row);

oForm.DataSources.DBDataSources.Item(source).Offset = _eventoItem.Row - 1;

oForm.DataSources.DBDataSources.Item(source).SetValue("U_ServGrp", _eventoItem.Row - 1, ServGroup);

oForm.DataSources.DBDataSources.Item(source).SetValue("U_ServType", _eventoItem.Row - 1, ServGroup);

oMatrix.SetLineData(_eventoItem.Row);