tags:

views:

25

answers:

1

I have to gather data from a sql database to populate a ning map i am creating. I only need data from one table in the database. The table has company data in it, name country state, email, website, etc.

What is the best way to do this? I am doing my bing map using .net so i was thinking of just gathering all my data in code behind in the .aspx.cs file. Or would it be better to do a dataset? I was thinking a dataset would be overkill for such a small amount of procedures.

Basicaly sql queries will look something like this

Populate a drop down with this query SELECT DISTINCT Country FROM Partners

On changing that drop down I will populate another drop down SELECT DISTINCT State FROM Partner WHERE Country = @country

after that i will grab a bunch of company data fro that country

Any help is appreciated.

A: 

Try Linq To Sql or ADO.NET Entity Framework. they are both fit to rapid development of a data access layer. just create the stored procedures used to get the Data from the DB and create Linq To Sql class or Entity class in your IDE.

Links that can help: ADO.net entity framework-Stored procedures

Linq to SQL-5 min overview