I am getting this error and i Don'r know where is the problem?
please help..
An unhandled exception of type 'VistaDB.VistaD BException' occurred in
vistadb.provide r.dll
Additional information: Error in dll_sql_ExecSQL
Error code: 546 Parameter not found in the list of params
Error code: 610 OpenSQL: Error:546
Parameter not found in the list of params
this is the code..
private void btnSave_Click(o bject sender, System.EventArg s e)
{
// save patients data;
VDBConnection.A ccessMode = AccessMode.Remo te;
VDBConnection.D ataSource = "127.0.0.1:2021 1";
VDBConnection.D atabase = "shefaDB";
VDBConnection.L oginUser = "SA";
VDBConnection.L oginPassword = "";
VDBConnection = new
VistaDBConnecti on("AccessMode= Remote;DataSour ce=127.0.0.1;Da tabase=shefa
DB;LoginUser = SA;LoginPasswor d =;");
string insertCmd = "insert into persons (PERSON_NAME, ID_TYPE,
ID_NUMBER, NATIONALITY, GENDER, DATE_OF_BIRTH, BLOOD_GROUP, COMPANY,
PROFESSION, MARITAL_STATUS, OLD_FILE_NO, PERSON_IS_VIP, ADDRESS_FLAT,
ADDRESS_BUILDIN G, ADDRESS_ROAD, ADDRESS_BLOCK, ADDRESS_AREA,
ADDRESS_PO_BOX, IS_OUTSIDE_COUN TRY, ADDRESS_OUTSIDE _ADDRESS,
ADDRESS_COUNTRY ) values (@fullname, @idtype, @idnumber, @nationality,
@gender, @dateofbirth, @bloodgroup, @company, @profession,
@maritalstatus, @oldfileno, @isvip, @address_flat, @address_buildi ng,
@address_road, @address_block, @address_area, @address_box,
@address_is_out side_country, @address_outsid e, @address_countr y)";
// string insertCmd = "insert into persons (PERSON_NAME, ID_TYPE,
ID_NUMBER, NATIONALITY, GENDER, DATE_OF_BIRTH, BLOOD_GROUP, COMPANY,
PROFESSION, MARITAL_STATUS, OLD_FILE_NO, PERSON_IS_VIP, ADDRESS_FLAT,
ADDRESS_BUILDIN G, ADDRESS_ROAD, ADDRESS_BLOCK) values (@fullname,
@idtype, @idnumber, @nationality, @gender, @dateofbirth, @bloodgroup,
@company, @profession, @maritalstatus, @oldfileno, @isvip,
@address_flat, @address_buildi ng, @address_road, @address_block) ";
VDBCommand.Comm andText = insertCmd;
VDBCommand.Conn ection = VDBConnection;
VDBCommand.Conn ection.Open();
VDBCommand.Para meters.Add("@fu llname", VistaDBType.Var char);
VDBCommand.Para meters.Add("@id type", VistaDBType.Var char);
VDBCommand.Para meters.Add("@id number", VistaDBType.Var char);
VDBCommand.Para meters.Add("@na tionality", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ge nder", VistaDBType.Var char);
VDBCommand.Para meters.Add("@da teofbirth", VistaDBType.Dat e);
VDBCommand.Para meters.Add("@bl oodgroup", VistaDBType.Var char);
VDBCommand.Para meters.Add("@co mpany", VistaDBType.Var char);
VDBCommand.Para meters.Add("@pr ofession", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ma ritalstatus", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ol dfileno", VistaDBType.Var char);
VDBCommand.Para meters.Add("@is vip", VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_flat", VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_building" ,
VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_road", VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_block", VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_area", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ad dress_box", VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_is_outsid e_country",
VistaDBType.Cha racter);
VDBCommand.Para meters.Add("@ad dress_outside", VistaDBType.Mem o);
VDBCommand.Para meters.Add("@ad dress_country", VistaDBType.Var char);
/*
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
VDBCommand.Para meters.Add("@ty pe", VistaDBType.Var char);
*/
// basic info
if (txtFullName.Te xt == "") VDBCommand.Para meters["@fullname"].Value
= null; else VDBCommand.Para meters["@fullname"].Value =
txtFullName.Tex t;
// VDBCommand.Para meters["@fullname"].Value = null;
VDBCommand.Para meters["@idtype"].Value = cboIDType.Text;
VDBCommand.Para meters["@idnumber"].Value = txtIDNumber.Tex t;
VDBCommand.Para meters["@nationali ty"].Value = cboNationality. Text;
VDBCommand.Para meters["@gender"].Value = cboGender.Text;
VDBCommand.Para meters["@dateofbir th"].Value = cboBirthday.Val ue;
VDBCommand.Para meters["@bloodgrou p"].Value = cboBlood.Text;
VDBCommand.Para meters["@company"].Value = cboCompany.Text ;
VDBCommand.Para meters["@professio n"].Value = cboProfession.T ext;
VDBCommand.Para meters["@maritalstatus "].Value =
cboMaritalStatu s.Text;
VDBCommand.Para meters["@oldfileno "].Value = txtOldFileNo.Te xt;
if (chkVIP.Checked == true) VDBCommand.Para meters["@isvip"].Value =
"Y"; else VDBCommand.Para meters["@isvip"].Value = "N";
// address
VDBCommand.Para meters["@address_f lat"].Value = txtFlat.Text;
VDBCommand.Para meters["@address_build ing"].Value = txtBuilding.Tex t;
VDBCommand.Para meters["@address_r oad"].Value = txtRoad.Text;
VDBCommand.Para meters["@address_block "].Value = txtBlock.Text;
if (txtArea.Text == "") VDBCommand.Para meters["@address_a rea"].Value
= "AA"; else VDBCommand.Para meters["@address_a rea"].Value =
txtArea.Text;
// VDBCommand.Para meters["@address_a rea"].Value = txtArea.Text;
VDBCommand.Para meters["@address_b ox"].Value = txtBox.Text;
if (chkOutsideAddr ess.Checked == true)
VDBCommand.Para meters["@address_is_ou tside_country"].Value = "Y"; else
VDBCommand.Para meters["@address_is_ou tside_country"].Value = "N";
if (txtOutsideAddr ess.Text == "")
VDBCommand.Para meters["@address_outsi de"].Value = "AA"; else
VDBCommand.Para meters["@address_outsi de"].Value =
txtOutsideAddre ss.Text;
if (cboCountry.Tex t == "")
VDBCommand.Para meters["@address_count ry"].Value = "AA"; else
VDBCommand.Para meters["@address_count ry"].Value = cboCountry.Text ;
// VDBCommand.Para meters["@address_outsi de"].Value =
txtOutsideAddre ss.Text;
// VDBCommand.Para meters["@address_count ry"].Value = cboCountry.Text ;
/*
VDBCommand.Para meters["@type"].Value = txtHomeTelCode;
VDBCommand.Para meters["@type"].Value = txtHomeTel;
VDBCommand.Para meters["@type"].Value = txtMobileCode;
VDBCommand.Para meters["@type"].Value = txtMobile;
VDBCommand.Para meters["@type"].Value = txtOtherTelCode ;
VDBCommand.Para meters["@type"].Value = txtOtherTel;
VDBCommand.Para meters["@type"].Value = txtOfficeTelCod e;
VDBCommand.Para meters["@type"].Value = txtOfficeTel;
VDBCommand.Para meters["@type"].Value = txtExtension;
VDBCommand.Para meters["@type"].Value = txtDirectTelCod e;
VDBCommand.Para meters["@type"].Value = txtDirectTel;
VDBCommand.Para meters["@type"].Value = txtHomeFaxCode;
VDBCommand.Para meters["@type"].Value = txtHomeFax;
VDBCommand.Para meters["@type"].Value = txtOfficeFaxCod e;
VDBCommand.Para meters["@type"].Value = txtOfficeFax;
VDBCommand.Para meters["@type"].Value = txtOtherFaxCode ;
VDBCommand.Para meters["@type"].Value = txtOtherFax;
VDBCommand.Para meters["@type"].Value = txtOfficeEmail;
VDBCommand.Para meters["@type"].Value = txtPersonalEmai l;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
VDBCommand.Para meters["@type"].Value = ;
*/
VDBCommand.Exec uteNonQuery();
MessageBox.Show ("Patient's file was created successfully. Would like
to make an appointment now?");
/*
try
{
VDBCommand.Exec uteNonQuery();
MessageBox.Show ("Added");
}
catch (SqlException e)
{
if (e.Number == 2627)
MessageBox.Show ("ERROR: A record already exists with");
else
MessageBox.Show ("ERROR: Could not add record");
}
*/
VDBCommand.Conn ection.Close();
// this.Close();
}
Many Thanks,
Jassim Rahma
*** Sent via Developersdex http://www.developersdex.com ***