Hi Everyone,

I have been asked to write some ASP that will interface with an MS SQL 2008 R2 database; with the intention of simply reading data from several tables (using SELECT). This is meant to be an easy task, however after delving into ASP .NET today I have quickly realized that there are many different avenues that I can take.

For starters I have two development tools available to me; Visual Studio 2013 & WebMatrix. Furthermore even within VS 2013 I have seven options for creating a new site, these include 'ASP.NET Empty Web Site', and 'ASP.NET Web Site (Razor vX)'. Once a Web Site type is chosen within VS 2013 there are several .NET Frameworks available (ranging from .NET 2.0 through to .NET 4.5).

I did begin my day by creating an ASP.NET Web Site (Razor V3) site, using .NET Framework 4.5, however I quickly encountered a number of errors. I was able to work through one or two of them, but am now stuck with authentication related troubles. I don't want to have to 'jump through hoops' to get this working, and am not really interested in Authentication.

The code that I am writing is for 'proof of concept' and will never be extended to include the entry of data into the SQL database.

I need the easiest way possible of writing ASP that will allow me to connect to and retrieve data from table(s).

Any suggestions on the best direction here, and preferably links to tutorials, will be greatly appreciated.

Kind Regards,


Member Avatar for [NOPE]FOREVER

you can use this connection string to conect to your specific DB

Data Source=servername;Initial Catalog=DatabaseName;User Id=serverloginusername;Password=serverloginpassword

then just use the predefined SELECT query which you should already know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.