0

Hi im having trouble creating a MS Access Databse using ASP.

Scenario: When a user registers, i want to be able to create an MS access database.

Here is a little code im using..

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
 <!--#include virtual="Includes/adovbs.inc"-->
 <%
 Dim sDatabaseName
 sDatabaseName = "\access_db\MyNewDatabase.mdb" 
 
 Sub CreateAccessDatabase(sDatabaseToCreate)
  Dim catNewDB ' As ADOX.Catalog
  Set catNewDB = Server.CreateObject("ADOX.Catalog")
  catNewDB.Create ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDatabaseToCreate & ";Jet OLEDB:Engine Type=5;")
 
  Set catNewDB = Nothing
 End Sub 
 
 CreateAccessDatabase sDatabaseName
 
 Response.Write("Database has been created successfully!")
 %>

Im having some trouble (eg. valid path), does anyone have any suggestion(s) or different code which might solve my problem? (only using asp)

Thanks.

1
Contributor
1
Reply
2
Views
10 Years
Discussion Span
Last Post by bubbliciousbar
0

Sorry fixed the problem. For some reason i need to use the FULL relative path.

Hope this post might help other with similar problems. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.