I'm trying to create an Access database using SQL. I'm very new at this language, in fact have never created a database through a script or SQL before. The error I'm getting says:
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/InternetProgrammingIIDocs/Practice/Chapter 22/Accounting.asp, line 10, column 16
CREATE DATABASE Accounting
-----------------^
Here is my entire code below:
<%@ Language=VBScript %>
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<title>Accounting</title>
</head>
<body>
<%
CREATE DATABASE Accounting
ON
(FILE = Accounting,
FILENAME = G:\Internet Programming II\Practice\Chapter 22\Accounting.mdb,
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5)
LOG ON
(FILE = AccountingLog
FILENAME = G:\Internet Programming II\Practice\Chapter 22\Accounting.ldb,
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB)
GO
%>
</body>
</html>
According to every source I've viewed on the net, you simple create a database by using the words CREATE DATABASE , but my browser says it's wrong. Is there some kind of dll or something I'm suppose to include before using SQL statements? I feel something is being missed.
Nick