i am using vb.net and sql server 2000
create table mytable(country varchar(20),city varchar(20))
insert into mytable values('Ethiopia','Mekelle)
insert into mytable values(('USA','newyork')
insert into mytable values('England','Chelsea')
dim str as string
str=select * from mytable where country=' "&txtcountry.text&" '
then when I enter country name from the textbox
let me enter, Ethiopia, USA, England, it works fine becuase these values are available in my table but when i try to enter values that don't exists on my table, i want to transfer it to other textbox or to dispaly as error message,
let me try to enter, kenya,then since 'Kenya' is not my table ,i will expect error message so how can i do this?
2007-03-26
10:37:29
·
2 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design