|
| ||||||||||
| Tags: asp dot net, ms access, web form |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to connect the web form to Ms Access using ASP.NET?
How to connect the web form to Ms Access using ASP.NET? Please guide me! |
|
#2
| |||
| |||
| Re: How to connect the web form to Ms Access using ASP.NET?
The following steps will help you to conenct to a MS Access Database from your ASP.NET web form. Step 1 : Create an Asp.Net Web Application a)File->New->Project select ASP.NET Web Application Click Ok Step 2: In the Design View of the form , from the WebForms ToolBox Drag and Drop a Button Drag and Drop a DataGrid Step 3 From the Data ToolBox, Drag and Drop a OleDBDataAdapter Now the Data Adapter Configuration Wizard Will Appear Click ON Next Click On New Connection In the Data Link Properties Form , Click On Provider Choose Microsoft Jet 4.0 OLE DB Provider(Or 3.51 OLE DB Provider, depending on MSAccess installed on your machine) Click On Next In the resulting window, Enter the complete path to your Local Access DataBase (For ex:C:\SampleDB\BooksDb.mdb). You can also browse the .mdb file using the Button next to the Text Box. Click on Test Connection to make sure that the DB exists and that you are able to connect to the Database. Dont forget to enter the password information if you are using a password for your database. Click on Ok. Step 4 Click on Next in the Data Adapter Configuration Wizard Make sure the "Use Sql Statements" Radio Button is Checked and Click Next Enter the SQL query in the Resulting window (For ex: Select * from Books) (Or You can use the Query Builder to build your queries) Click Next Click Finish Now you are all set to retreive the data from the DataBase you specified. Step 5 Now In the Button Click Event, include the following Statements Code: DataSet dataset=new DataSet(); this.oleDbDataAdapter1.Fill(dataset); this.DataGrid1.DataSource=dataset; DataGrid1.DataBind(); |
|
#3
| |||
| |||
| Re: How to connect the web form to Ms Access using ASP.NET? http://msdn.microsoft.com/library/de...components.asp I see from this page ms recommends using SOAP as an alternative for remote db access. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to connect the web form to Ms Access using ASP.NET?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Access - form with a dropdown menu | Logan 2 | Windows Software | 5 | 21-01-2010 01:18 PM |
| Access vba code form issue | Jaiwanti | Software Development | 3 | 06-07-2009 12:32 PM |
| How to create access clear button in the form using MS ACCESS | T0tal L0$$ | Software Development | 3 | 09-06-2009 10:59 AM |
| Form SubForm ACCESS 2007 | streetprods | Software Development | 2 | 30-05-2009 03:18 PM |
| To access a text field from another form | Sanket07 | Software Development | 6 | 06-02-2009 05:42 PM |