ASP.NET n00b needs help here

Discussion in 'ASP .Net' started by John McClamrock, Feb 3, 2005.

  1. Hello, I'm just starting out with ASP.NET and it looks great. I have minimal
    programming experience and have some PHP experience. I've also pretty much
    mastered HTML.

    I need a little help here. I made an access database with the Web Matrix,
    and connected to it using the Select function, but how do I display
    information on the page?

    Database: database.mdb
    Table: name
    Columns: FirstName, LastName, MiddleName

    And this is what I have so far:

    Function MSAccessQuery() As System.Data.DataSet
    Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;
    Ole DB Services=-4; Data Source=C:\Documents an"& _
    "d Settings\John\My Documents\database.mdb"
    Dim dbConnection As System.Data.IDbConnection = New
    System.Data.OleDb.OleDbConnection(connectionString)

    Dim queryString As String = "SELECT [name].[FirstName],
    [name].[LastName], [name].[MiddleName] FROM [name]"
    Dim dbCommand As System.Data.IDbCommand = New
    System.Data.OleDb.OleDbCommand
    dbCommand.CommandText = queryString
    dbCommand.Connection = dbConnection

    Dim dataAdapter As System.Data.IDbDataAdapter = New
    System.Data.OleDb.OleDbDataAdapter
    dataAdapter.SelectCommand = dbCommand
    Dim dataSet As System.Data.DataSet = New System.Data.DataSet
    dataAdapter.Fill(dataSet)

    Return dataSet
    End Function

    So, in the Design area, what do I add, or in the HTML area if needed, what
    should I use to display the information I added to the database.

    Thanks ahead of time.

    --

    John McClamrock
     
    John McClamrock, Feb 3, 2005
    #1
    1. Advertising

  2. John McClamrock

    BG Guest

    John, a great place to start would be the ASP.NET Quick Start Tutorials at
    http://www.asp.net/Tutorials/quickstart.aspx. There are lots of examples of
    data binding server controls, etc..


    "John McClamrock" <> wrote in message
    news:...
    > Hello, I'm just starting out with ASP.NET and it looks great. I have
    > minimal programming experience and have some PHP experience. I've also
    > pretty much mastered HTML.
    >
    > I need a little help here. I made an access database with the Web Matrix,
    > and connected to it using the Select function, but how do I display
    > information on the page?
    >
    > Database: database.mdb
    > Table: name
    > Columns: FirstName, LastName, MiddleName
    >
    > And this is what I have so far:
    >
    > Function MSAccessQuery() As System.Data.DataSet
    > Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;
    > Ole DB Services=-4; Data Source=C:\Documents an"& _
    > "d Settings\John\My Documents\database.mdb"
    > Dim dbConnection As System.Data.IDbConnection = New
    > System.Data.OleDb.OleDbConnection(connectionString)
    >
    > Dim queryString As String = "SELECT [name].[FirstName],
    > [name].[LastName], [name].[MiddleName] FROM [name]"
    > Dim dbCommand As System.Data.IDbCommand = New
    > System.Data.OleDb.OleDbCommand
    > dbCommand.CommandText = queryString
    > dbCommand.Connection = dbConnection
    >
    > Dim dataAdapter As System.Data.IDbDataAdapter = New
    > System.Data.OleDb.OleDbDataAdapter
    > dataAdapter.SelectCommand = dbCommand
    > Dim dataSet As System.Data.DataSet = New System.Data.DataSet
    > dataAdapter.Fill(dataSet)
    >
    > Return dataSet
    > End Function
    >
    > So, in the Design area, what do I add, or in the HTML area if needed, what
    > should I use to display the information I added to the database.
    >
    > Thanks ahead of time.
    >
    > --
    >
    > John McClamrock
    >
     
    BG, Feb 3, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. newgenre

    n00b needs SQL Server

    newgenre, Apr 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    291
    Curt_C [MVP]
    Apr 15, 2004
  2. sardaukar

    Is this possible? (n00b here)

    sardaukar, Sep 13, 2006, in forum: .NET
    Replies:
    0
    Views:
    288
    sardaukar
    Sep 13, 2006
  3. Replies:
    8
    Views:
    319
    Old Wolf
    Feb 28, 2007
  4. Chris Mays

    String Question... Real n00b here

    Chris Mays, Apr 7, 2009, in forum: Ruby
    Replies:
    2
    Views:
    116
    Chris Mays
    Apr 7, 2009
  5. Koncept

    n00b needs help pls.

    Koncept, May 1, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    114
    Koncept
    May 2, 2004
Loading...

Share This Page