Click here to Skip to main content
15,896,450 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All

Can anyone please tell me how to get a information from a remote database...like I have a spinner with all countries and everytime when i select one country it must populate all the Provinces under that country.. city likewise :)

Tanx InAdvance
Posted

1 solution

create procedure proc_Country_ProvincesInfo

@SERVERNAME
SQL
varchar(max)

@DISTRIBUTEDDBNAME
SQL
varchar(max)

@countryname
SQL
varchar(max))


as
begin
Declare @SQLSTATEMENT NVARCHAR(MAX)

SET @SQLSTATEMENT='select Provinces from '+@SERVERNAME+'.'+@DISTRIBUTEDDBNAME+'.[dbo].TableName where countryname=@countryname'

EXEC SP_EXECUTESQL @SQLSTATEMENT
end
 
Share this answer
 
Comments
zamani2 12-Jun-12 2:06am    
I dont think there are store proc is android

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900