vb.net - operator/operand type mismatch when update dbf file -


i have program needs update data in dbf file. keeps appear error 'operator/operand type mismatch'. here sample code :

    dim con oledbconnection = new oledbconnection("provider=vfpoledb;data source=c:\folder\paytran.dbf;collating sequence=machine;")     try           dim strsql string = "update paytran.dbf set workhr = 20  empno = 102"         dim cmd oledbcommand = new oledbcommand(strsql, con)         con.open()         dim myda oledbdataadapter = new oledbdataadapter(cmd)         dim mydataset dataset = new dataset()         ' using dataadapter object fill data database dataset object         myda.fill(mydataset, "mytable")         ' binding dataset datagridview         dgv.datasource = mydataset.tables("mytable").defaultview         con.close()         con = nothing     catch ex exception         messagebox.show(ex.message, "error select data")              if con isnot nothing             con.close()         end if     end try 

please me..

its connection string. connection string should have point path data files located, sql based commands default able see .dbf tables in path (or forward if subpaths exists).

data source=c:\folder 

instead of

data source=c:\folder\paytran.dbf 

so, if have 30 tables in "c:\folder", can query of them needed.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -