简体   繁体   中英

How to check if record is existing in ms access database using vb.net?

I have to publish vacant positions in publication system. But before saving in database it will check the Position title in "Postit" column/field and item number in "itemno" column/field if the text already existing in record in the same row. I dont know if it is correct to put many "WHERE" inside the .Open clause or can I put "AND" to avoid many "WHERE". Can you please help me solve this. Thanks... Some part of the codes is stated below:

Error in this line of code:

.Open("Select * from pop where vacantnotvacant ='" & "vacant" & "' , where Position = '" & ListViewEx1.Items.Item(h).SubItems(2).Text & "'", psipopcon, 2, 3)

试试这个代替你的开放线

.Open("Select * from pop where vacantnotvacant ='" & "vacant" & "' and Position = '" & ListViewEx1.Items.Item(h).SubItems(2).Text & "'", psipopcon, 2, 3)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM