Posted on: 5/11/2013 7:03:05 AM | Views : 249

My database,table and field
database:-onlineMotelBooking
table name:-Hotels_Info
field hotel_id hotel_name
database:-taxasm3db
table name:-LacopaInnHotels field id hotel_id
retrive hotel name from hotel id both table same

Select a.HotelName From onlineMotelBooking.Hotels_Info as a Inner Join taxasm3db.LacopaInnHotels as b on a.HotelID = b.HotelID
than fill data dropdownlist
---------------------------------------
Dim myconn As New SqlConnection(ConfigurationManager.ConnectionStrings("MotelBookingConnectionString").ConnectionString) Dim myconn1 As New SqlConnection(ConfigurationManager.ConnectionStrings("TX").ConnectionString) 'myconn.Open() Dim cmd1 As New SqlCommand("Select a.HotelName From onlineMotelBooking.Hotels_Info as a Inner Join taxasm3db.LacopaInnHotels as b on a.HotelID = b.HotelID", myconn1)
D ...

Go to the complete details ...