If you look on the web you will eventually find an example that refers to the Northwind sample database in one of the their examples. What they fell to tell you is where to find this sample database and how to add to your database. Follow these steps to add the Northwind sample database to your SQL Server: 1. Go the URL http://www.microsoft.com/en-us/download/details.aspx?id=23654 and download the Northwind and pubs sample database from Microsoft. 2. Double click on the SQL2000SampleDb.msi file, then click "Run" 3. After you finished with the installer you will have the sample databases in the "SQL Server 2000 Sample Databases" folder in the C drive 4. Log onto SQL Server using SQL Server Management Studio 5. Right-click on the "Databases" node inside the "Object Explorer" window, then select "Attach" 6. Click on the "Add" button, in the "Attach Database" window 7. Select the "NORTHWND.MDF" file inside t...
The purpose of this blog is to show you the bare bones of ASP.NET. Often times when you search for a tutorial on the web you see that the tutorials are way too complex or an overkill of what you are trying to do at that moment. So the in this blog series I want to cut through all the fat and just show you how to get things done quickly. The best way to start an ASP.NET web application is to create an empty project. In this tutorial I will show you how to create an empty web application project in Visual Studio 2012. You can download Visual Studio 2012 at http://www.microsoft.com/visualstudio/eng/downloads#d-2012-editions you can get a 90 trial by registering with microsoft.com. Another alternative is to download the free Visual Studio Express version at http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express Here are the steps to create an empty web application project in Visual Studio 2012 1. Open Visual Studio 2012 2. Click on "File", t...
In this blog we will go over how to query an Oracle database in ASP.NET using the System.Data.OracleClient data provider in C#. Namespaces: using System.Web.Configuration; using System.Data.OracleClient; using System.Data; string cs = WebConfigurationManager.ConnectionStrings["SomeConnectionString"].ConnectionString; using (OracleConnection oc = new OracleConnection(cs)) { oc.Open(); DataTable dt = new DataTable(); OracleCommand ocmd = new OracleCommand("SELECT * FROM SOMETABLE", oc); OracleDataAdapter oda = new OracleDataAdapter(ocmd); oda.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind(); }
Comments
Post a Comment