conversion from string "g" to type "Double" is not valid vb.net -


i'm facing conversion string "g" type "double" not valid vb.net error every time i'm debugging. couldn't find solution far.

i need submit project tomorrow, can't rid of problem.

below code , database table:

private sub load_record()     dim conn new oledbconnection     dim cmd new oledbcommand     dim dr oledbdatareader      try          conn = new oledbconnection(get_constring)         conn.open()         cmd.connection = conn         cmd.commandtype = commandtype.text         cmd.commandtext = "select stud_firstname, stud_lastname, stud_age, stud_icnumber, stud_dateofbirth, stud_birthplace, stud_phonenumber, stud_email, parents_firstname, parents_lastname, parents_age, parents_icnumber, parents_address, parents_salary, parents_phonenumber, parents_relation student info query stud_icnumber= " & me.txtic.tag         dr = cmd.executereader         if dr.hasrows             while dr.read                 me.txtic.tag = dr("stud_icnumber")                 me.txtfname.text = cstr(iif(not isdbnull(dr("stud_firstname")), dr("stud_firstname"), ""))                 me.txtlname.text = cstr(iif(not isdbnull(dr("stud_lastname")), dr("stud_lastname"), ""))                 if not isdbnull(dr("stud_dateofbirth"))                     me.txtdateb.format = datetimepickerformat.short                     me.txtdateb.value = dr("stud_dateofbirth")                 end if                 me.txtage.text = cint(iif(not isdbnull(dr("stud_age")), dr("stud_age"), ""))                 me.txtbirthplace.text = cstr(iif(not isdbnull(dr("stud_birthplace")), dr("stud_birthplace"), ""))                 me.txtphone.text = cstr(iif(not isdbnull(dr("stud_phonenumber")), dr("stud_phonenumber"), ""))                 me.txtemail.text = cstr(iif(not isdbnull(dr("stud_email")), dr("stud_email"), ""))                 me.txtfnamep.text = cstr(iif(not isdbnull(dr("parents_firstname")), dr("parents_firstname"), ""))                 me.txtlnamep.text = cstr(iif(not isdbnull(dr("parents_lastname")), dr("parents_lastname"), ""))                 me.txtagep.text = cint(iif(not isdbnull(dr("parents_age")), dr("parents_age"), ""))                 me.txticp.text = cstr(iif(not isdbnull(dr("parents_icnumber")), dr("parents_icnumber"), ""))                 me.txtaddp.text = cstr(iif(not isdbnull(dr("parents_address")), dr("parents_address"), ""))                 me.txtsalaryp.text = cdec(iif(not isdbnull(dr("parents_salary")), dr("parents_salary"), ""))                 me.txtphonep.text = cstr(iif(not isdbnull(dr("parents_phonenumber")), dr("parents_phonenumber"), ""))                 me.txtrelationp.text = cstr(iif(not isdbnull(dr("parents_relation")), dr("parents_relation"), ""))             end while         end if      catch ex exception         msgbox(errortostring)             conn.close()     end try end sub 

1 2


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -