Hi,
I am working with oledb to connect to an Informix database, so, when i try
to execute a select command to retrive data from a table that holds a money
field, i get the following error:
"Decimal byte array constructor requires an array of length four containing
valid decimal bytes"
This error is raised when the oledbdataadapter try to fill the dataset, it
just only happens when i try to make a multiplication or division over the
money field of the table.
I would really appreciate your comments, ideas, suggestions..!
Thanks in advance...
I am using the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim sql As String = "select c.cod_credenciado, c.nom_credenciado, v.cod_empresa, " +"v.nom_empresa, sum(a.vlr_atendimento) as vlr_total_atend " + "from atendimento a "
Dim strconn As String =
ConfigurationSettings.AppSettings("CIRC_Connection String")
AddHandler ad.FillError, New FillErrorEventHandler(AddressOf FillError)
Try
conn = New OleDbConnection(strconn)
conn.Open()
command = New OleDbCommand(sql, conn)
command.CommandType = CommandType.Text
ad.SelectCommand = command
ad.Fill(ds, "prueba")
command.Dispose()
conn.Close()
DataGrid1.DataSource = ds
DataGrid1.DataBind()
Catch ex As OleDbException
End Try
End Sub
Alyssonjedi@hotmail.com