command.CommandType = CommandType.StoredProcedure
command.CommandText = "{?=call gtab09_INSERT(_acyrid,_RepId,_DrId,_vrid,_mode, _trno, _trdate, _acid, _vrno, _SuppId,_custname,_netamt,_disrate,_disamt,_RoundOff,_jrmid, _userid,_userdtm,_VSNo,_RecdAmt,_cstrate,_cstsaleamt,_cstamt,_tdrate,_tdamt,_cdrate,_cdamt,_CessRate,_CessAmt,_odesc1,_oamt1,_CashCredit,_OrderNo,_OrderDate,_CustAdd2,_Remarks,_WhoRetSl,_PatName,_DrName,_FormId,_SalesMan,_CFMode,_PatId,_StkPtId,_DisType,_BranchID)}"
command.Parameters.Add("_acyrid", gintAcYrId)
command.Parameters.Add("_RepId", Val(cboRep.SelectedValue))
command.Parameters.Add("_DrId", Val(cboDoctor.SelectedValue))
command.Parameters.Add("_vrid", mlngVrId)
command.Parameters.Add("_mode", Val(cboMode.SelectedIndex))
command.Parameters.Add("_trno", txtslno.Text)
command.Parameters.Add("_trdate", Format(dteDate, "yyyy-MM-dd"))
command.Parameters.Add("_acid", CustAcId)
I am getting
Unable to cast object of type
'C1.Win.C1Input.C1DateEdit' to type 'System.IConvertible' error
in
command.Parameters.Add("_trdate", Format(dteDate, "yyyy-MM-dd"))
using VB.net 2008
and PostgreSql
Database in postgres
date field should be in yyyy-MM-dd
Format. This is an Insert function