ASP and MS Access

accessman2

Registered User.
Local time
Yesterday, 18:19
Joined
Sep 15, 2005
Messages
335
Hi,

I am new on ASP. I have a simple question.

I know that ASP can connect SQL Server.

But, can ASP connect to MS Access?

Please let me know, thanks.
 
accessman2 said:
Hi,

I am new on ASP. I have a simple question.

I know that ASP can connect SQL Server.

But, can ASP connect to MS Access?

Please let me know, thanks.

I know that ASP.Net can. I did it last night in class.
 
I have another question,

Is it same, ASP VS ASP.Net?
 
accessman2 said:
I have another question,

Is it same, ASP VS ASP.Net?

Similar, but ASP.Net requires the .net frame work. That is the main difference. However, I have never used ASP. I have started on ASP.net instead. That is what I am taking currently in school.
 
Yes you can, its the same concept. just a different provider
i.e see connectionstrings.com for the syntax

Use OLEdb.

ASP.NET requires .NET 1.x/2.x framework yes and the
syntax is slightly different. You can use VB.NET
or C# codes with .NET.

Hope this helps.

John
 
sample code to connect to Access Database with ASP

here is some sample code of how to connect to an access database with asp.
It also shows how to bind the data you have returned from the connection to a datagrid,
Hope this is ok for you

Sub GetAuthors_Click(Sender As Object, E As EventArgs)
Dim DS As DataSet
Dim MyConnection As ADOConnection
Dim MyCommand As ADODataSetCommand
Dim SelectCommand As String = "SELECT * FROM Authors"
MyConnection = New ADOConnection("dsn=pub2")
MyCommand = New ADODataSetCommand(SelectCommand, MyConnection)
DS = new DataSet()
MyCommand.FillDataSet(DS, "Authors")
MyDataGrid.DataSource=DS.Tables("Authors").DefaultView
MyDataGrid.DataBind()
End Sub
 

Users who are viewing this thread

Back
Top Bottom