This is an example of web Connections to a MsAccess Databaseusing Ado in ASP
,  I also can cover php , java , javascript , visual basic  etc etc 

Any Further Questions about ADO Access And web technology Please Email me
Via  [EMAIL PROTECTED]

Connecting ASP Pages to MS Access Databases 

Connecting an ASP page to a MS Access database is relatively simple: 

1. Create a MS Access database file with a table inside. And enter some data
in the table. 

2. Move the MS Access file to a your Web server. 

3. Create an ADODB.Connection object in your ASP page. And link the object
to the MS Access file with the Open() method: 

   Set oConn = Server.CreateObject("ADODB.Connection")

   oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=access_file"

where "access_file" is the full path name pointing the MS Access file. There
is no need to define a Data Source name with ODBC. 

4. Prepare a SQL select statement. And execute the select statement through
the connection object. 

5. Loop through the execution result object to retrieve data returned from
the select statement. 

6. Output the retrieved data to the Web page. 

7. Close the result object and the connection object. 

 

ran MS Access. Created a blank database file called: "hello.mdb". Then
created a table called "message" in the database. In the "message" table, I
added one field called "text". 

Before closing the database file, I inserted one row in the "message" table
with "Hello world!". 

Then I copied "hello.mdb" to my local IIS server as
"c:\inetpub\wwwroot\cgi-bin\hello.mdb". 

My ASP script for this test was very simple, hello_access.asp: 

<script language="vbscript" runat="server">

'  hello_access.asp

'  Copyright (c) 2005 by Dr. Herong Yang, http://www.herongyang.com/

 

   Set oConn = Server.CreateObject("ADODB.Connection")

   oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _

      Server.MapPath("/cgi-bin/hello.mdb")

   Set oRes = oConn.Execute("SELECT * FROM message")

 

   Response.write(oRes("text"))

 

   oRes.close

   oConn.close 

</script>

This script was also copied to my local IIS server as
"c:\inetpub\wwwroot\hello_access.asp". 

Then I opened Internet Explorer with http://localhost/hello_access.asp. I
got: 

Hello world!

Working, right? 

Notes on this test: 

*       The database driver "Microsoft.Jet.OLEDB.4.0" is smart to know how
to talk to a MS Access database. 
*       Server.MapPath() is used to convert a Web server path name to a
Windows harddisk path name. 
*       I did not use any loop structure on the result object. Only the
first row is retrieved from the result object. 

Persisting Data to MS Access Databases 

Persisting data to a MS Access database is also easy: 

1. Create a MS Access database file with a table inside. 

2. Move the MS Access file to a your Web server. 

3. Create an ADODB.Connection object in your ASP page. And link the object
to the MS Access file with the Open() method. 

4. Prepare a SQL insert statement. And execute the insert statement through
the connection object. 

5. Close the connection object. 

 

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of garry
Sent: Wednesday, January 10, 2007 4:36 PM
To: [email protected]
Subject: [SPAM] [ms_access] newbie question-first of many
Importance: Low

 

what do i need to creat my database with , i mean what other programs 
do i need and how do they interconnect to make a web page?

 


  _____  

I am using the free version of SPAMfighter for private users.
It has removed 91 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter <http://www.spamfighter.com>  for free now!



[Non-text portions of this message have been removed]

Reply via email to