How do I check if data is in a database? (Visual basic 2010) (SQL)?
Jon
2013-02-23 09:07:40 UTC
I need to check if a certain 'seat number' has already been entered into the database so i can avoid double booking. But I don't know how to check if that data is in the data base..
For example
if data is not in data base
book seat
else
do not book
end if
Three answers:
Level 7 is Best
2013-02-23 09:50:15 UTC
Using SQL
check if database exists
check if table exists
use SELECT COUNT(*) to see if records exist
jose
2013-02-23 09:48:36 UTC
I don't know how big your data base is but you could write a SQL statement that will pull the information for you.
select
bookseat, (another primary field)
From
Seats (you data base name)
where
Data field ='2/23/2013' (if you have a data in there you can make your list smaller)
If you only know the name of the table then you can just do
select*
From
tablename
but this will pull everything.
croke
2016-12-12 13:06:11 UTC
Why do you utilize a photo field and not a label? i've got self assurance with Label is fairly straightforward you are able to make a label on the comparable place, length, heritage and foreground shade of the textbox password initiate with practice label and cover textbox. while person click on label, in the label click experience you cover label and practice textbox Sub label_click ... Label1.seen=fake Textbox1.seen=genuine end sub Use textbox password char to set character to coach once you digit password while person press return you cover textbox, reproduction password with label1.text fabric = textbox1.text fabric and practice label
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.