Here I will give a short example of how to add a table to a database using ADOX. This means that you can add a table remotely without having to use Access at all. Adding a table is quite simple.
Nuts Own Code

Asp Directory

Nuts Web Search
Web Directory
Web Search

Nuts ASP Code
Functions
Scripts
Tutorials
Wizards
Fonts
Download Fonts
Download Dll Files
Dll Files
Relaxing Games
Online Games
Take Our Poll
Do you use .Net?
Yes
No
Not Yet
Dot What?
Really, Take It!
Get The Source
About Nuts4Asp
Privacy
Contact Us
Arts
Movies, Television, Music
Business
Jobs, Industries, Investing
Computers
Internet, Software, Hardware
Games
Video Games, RPGs, Gambling
Health
Fitness, Medicine, Alternative
Home
Family, Consumers, Cooking
Kids and Teens
Arts, School Time, Teen Life
News
Media, Newspapers, Weather
Reference
Maps, Education, Libraries
Regional
US, Canada, UK, Europe
Science
Biology, Psychology, Physics
Sports
Baseball, Soccer, Basketball
World
Deutsch, Español, Français, Italiano, Japanese, Nederlands, Polska, Svenska
Help build the largest human-edited directory of the web

In this case we will assume you need a table that has four fields that will house the data from a form. This form will extract a name, email address, comments, and geographical region from users on your site. 

First lets start with a connection. I use a DSN-LESS connection here, but it's up to you.

<%
Set adConn = Server.CreateObject("ADODB.Connection")
adPath = "E:/the/path/to/your/database.mdb"
adConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & adPath & ";"
%>


Next comes the SQL work. Here's where we actually do the work.

<%
adSQL = "CREATE TABLE newtbl (Name text (50), Email text (75), Comments text (255), Region text (50))"
%>

And we execute the SQL statement now.

<%
adConn.Execute adSQL
%>

Of course we close everything.

<%
adConn.Close
Set adConn = Nothing
%>

Altogether:
<% 
Set adConn = Server.CreateObject("ADODB.Connection")
adPath = "E:/the/path/to/your/database.mdb"
adConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & adPath & ";"
adSQL = "CREATE TABLE newtbl (Name text (50), Email text (75), Comments text (255), Region text (50))"
adConn.Execute adSQL
adConn.Close
Set adConn = Nothing
%>

Bad or missing query parameters in request.

Copyright © 2001-2008 Nuts4Asp.com
All other names used are property or copyright of their respective owners.