Create | data | Database on the Internet to see a lot of this code, but some are not available, some are too many garbage code, I simply modified a bit now share with you.
<%
Option Explicit
Dim DatabaseName ' defines the database name
Databasename= "Database.mdb" database name
Dim DatabasePath ' Defines the database store path
Databasepath= "D:\office\jd\21\database\" Database absolute path
Dim databasever ' defines database version 2000 or 97
Databasever = "2000"
Function Createdfile (Filepath,filename,ver)
Dim Ca,dbver
Select Case ver
Case "97"
Dbver = "3.51"
Case "2000"
Dbver = "4.0"
End Select
If Dbver <> "" Then
Set Ca = Server.CreateObject ("ADOX.") Catalog ")
Call Ca.create ("Provider=microsoft.jet.oledb." & Dbver & ";D ata source=" & filepath & filename)
End If
End Function
Createdfile databasepath,databasename,databasever ' CREATE database
%>
It would not be useful to create a database with ASP, however, this is not to appear to be a better thing.