ASP.NET n00b needs help here

  • Thread starter John McClamrock
  • Start date
J

John McClamrock

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top