Question about use access(database) please help me

lung

New member
Joined
Jul 15, 2008
Messages
3
Programming Experience
1-3
please load my file

do you see?

it's program example.

(database) in table country have country name and in that country have city

but in my program , i don't know what incorrect :eek: in form cus i want to add account then i want to change country and change city in country but incorrect example : singkapoo(country) have city name of other country

i want to when i change singkapoo have name of city only kulalamper

do you understand ?

sorry i speak english alittle bit

please help me sir
 

Attachments

  • 5.zip
    43.6 KB · Views: 15
Last edited by a moderator:
what's this code?

DATABASE

Student.mdb have 2 table
table1:ID = Autonumber,Name = Text,IDcountry = Text
table2:IDcountry = Text,Country = Text

table1 and table2 have relationship by IDcountry

do you understand

VB.NET:
ad = dataadapter 
ds = dataset 

str as string 


ad = new data..("select * from table2",con) 
ad.fill(ds,"table2") 


str = "select * from table1" 



[COLOR="Red"]ad.selectcommand.commandtext = str [/COLOR]




Quote:i don't understand , why to use this code , why to use ad = new data..("select * from table2",con)


and why to use table2 first,


i ontice: use table2 first cause table1 call table2, true or false


and i think correct


Quote:if have 3 table have relationship,how do?
 

Latest posts

Back
Top