Database Access connection. Please help

Please help I am new to the ASP.NET
I have created a page using WEBMATRIX. And I have a database with only one table 'Qoutes' with the following fields QCode and QDescription created with Microsoft Access. So first, I want to connect this page to the database so that when the page loads the content of the table 'Qoute' be displayed in the table. The other problem is if I want to see, say one qoute only on the next page with link of the QCode, how do I send the QCode to the next page or how do I create a session variable.

Thanks in advance.


  • place datagrid, and the below code help u to solve ur problem.

    Cn = New OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("MdbTest.mdb"))

    Dim Qry As String
    Qry = "Select Count(Id) from Employee"

    Dim Cmd As New OleDbCommand(Qry, Cn)
    lblHeader.Text = "Employee List (" & Cmd.ExecuteScalar() & ")"

    Qry = "Select * from Employee"
    Ds = New DataSet()
    Dim Da As New OleDbDataAdapter(Qry, Cn)
    Da.Fill(Ds, "Employee")

    dgEmployee.DataSource = Ds

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion