Click to See Complete Forum and Search --> : help to retrieve data from database


chetan1
04-22-2008, 05:21 AM
hi
I have on form in which four textboxes like emp name,empid and next is city ,state.The data has been saved in database but did not retrieved. I have made two tables of emp and city.
In emp table empname and empid saved and city,state saved in other table.

what will be the store procedure or query to retrieve data from two tables.

thanks

Shanu.chaudhary
04-22-2008, 05:27 AM
In emp table empname and empid saved and city,state saved in other table.

U need to maintain a common field for both the tables...

"empid" is the common one...
Then U need to write a Query something like select filednames from emp,city where emp.empid = city.empid.....and if u need to display the data for the particular selected value then empname = "selected value"..

In which language u r doing this???:confused:

chetan1
04-22-2008, 08:13 AM
I'm using vb.net.These fields should be shown in textfields.I have one listview inwhich organisation and id appeared.when i click on organisation,the emp name
empid and cty ,state values filled in textboxes.
what would be the code in vb.net?

Shanu.chaudhary
04-22-2008, 08:34 AM
Sorry I don't hav any idea on .net:( :(
But the query is corerct since i hope u r using sql...:p

Thanks...
Shanthi..