ASP and MS Access (1 Viewer)

accessman2

Registered User.
Local time
Today, 03:22
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.
 

selenau837

Can still see y'all......
Local time
Today, 06:22
Joined
Aug 26, 2005
Messages
2,211
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.
 

accessman2

Registered User.
Local time
Today, 03:22
Joined
Sep 15, 2005
Messages
335
I have another question,

Is it same, ASP VS ASP.Net?
 

selenau837

Can still see y'all......
Local time
Today, 06:22
Joined
Aug 26, 2005
Messages
2,211
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.
 

webster

Registered User.
Local time
Today, 03:22
Joined
Mar 21, 2006
Messages
20
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
 

daceyj

New member
Local time
Today, 10:22
Joined
Jan 5, 2006
Messages
6
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

Top Bottom