ACC97: Out of Memory Error Viewing ASP Page w/Large SQL Stmt
ID: Q191099
|
The information in this article applies to:
-
Microsoft Access 97
-
Microsoft Internet Information Server version 3.0
-
Microsoft Visual Basic, Scripting Edition, version 2.0
-
Active Server Pages
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multi-user skills.
When you browse to an Active Server Pages (ASP) file that was exported from
Microsoft Access 97, and the file contains a large query, you may receive
the following error message:
Microsoft VBScript compilation error '800a03e9' Out of Memory
CAUSE
The ASP page contains a query that exceeds the 1,022 character line limit
set by VBScript and you are using the Microsoft products listed at the
beginning of this article.
RESOLUTION
To correct this problem, you must first open the .ASP file using Notepad or
another text editor, and break the SQL string into smaller segments. For
example, assume that you have the following select statement within your
ASP file:
sql = "Select * from MyTableName where FieldName = 'aaaa'"
This statement should be modified as follows:
sql = "Select *"
sql = sql & " from MyTableName"
sql = sql & " where FieldName = 'aaaa'"
MORE INFORMATIONHow to Determine Your Version of VBScript and ASP
To determine which version of VBScript you have, follow these steps:
- Click the Start button, point to Find, and then click Files Or Folders.
- In the Named box, type vbscript.dll, and
then click Find Now.
- Using the right mouse button, click the Vbscript.dll file name in
the Name list, and on the shortcut menu, click Properties.
- Click the Version tab and note the "File version" information.
VBScript DLL version File Date File Size
---------------------------------------------------
2.0 2.0.0.1125 (varies) 252,232 bytes
For additional information about versions of VBScript, please see the
following article in the Microsoft Knowledge Base:
Q167138 OL97: General Information About Using VBScript with Outlook
To determine which version of ASP you have, follow these steps:
- Click the Start button, point to Find, and then click Files Or Folders.
- In the Named box, type asp.dll, and
then click Find Now.
- Using the right mouse button, click the asp.dll file name in
the Name list, and on the shortcut menu, click Properties.
- Click the Version tab and note the "File version" information.
ASP DLL version File Date File Size
---------------------------------------------------
1.0b 1.15.14 3/14/97 378,992
For additional information about versions of ASP, please see the following
article in the Microsoft Knowledge Base:
Q170768 INFO: Versions of Active Server Pages
Steps to Reproduce Behavior
NOTE: This section contains information about editing ASP files, and
assumes that you are familiar with editing ASP files. Microsoft Access
Product Support professionals do not support customization of any HTML, HTX,
IDC, or ASP files.
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file
and perform these steps on a copy of the database.
- Start Microsoft Access and open the sample database Northwind.mdb
- Select the Invoices query from the Database window, and then on the
Edit menu, click Copy.
- On the Edit menu, click Paste. In the Paste As dialog box,
type qryASPTest.
- Open the qryASPTest query in Design view, and add the following fields
to the query grid:
Field: QuantityPerUnit
Table: Products
Show: Yes
Field: UnitsInStock
Table: Products
Show: Yes
Field: UnitsOnOrder
Table: Products
Show: Yes
- Add the following criteria to the CustomerID field:
[Enter ID]
- On the Query menu, click Parameters.
- Type the following in the Query Parameters dialog box, and then
click OK.
Parameter Data Type
----------------------------
[Enter ID] Text
- Save the qryASPTest query and close it.
- Select the qryASPTest query in the Database window, and then on the
File menu click Save As/Export.
- In the Save As dialog box, click "To an External File or Database,"
and then click OK.
- In the "Save Query 'qryASPTest' In" dialog box, select Microsoft
Active Server Pages (*.asp) in the Save As Type box, and type
qryASPTest.asp in the File Name box. Note the folder where the files
will be exported. Click Export. The Microsoft Active Server Pages
Output Options dialog box appears.
- In the Data Source Name box, enter the name of a System DSN that
points to the sample database Northwind.mdb.
For more information on how to define a system DSN, search the Help
index for "ODBC, setting up data sources," and see the following
article in the Microsoft Knowledge Base:
Q159682 "Data Source Name Not Found" Err Msg Opening Web Page
- Click OK in the Enter Parameter Value dialog box that appears. Note
that the ASP output creates two files: qryASPTest.html and
qryASPTest.asp.
- Copy qryASPTest.html and qryASPTest.asp to a folder on your Web Server
computer where you have both Read and Execute permission. Read
permission is necessary to browse the HTML file, and execute
permission is necessary to run the ASP file.
- Start Microsoft Internet Explorer or another Web browser program.
Type the Uniform Resource Locator (URL) in the address box of your Web
browser to view qryASPTest.html. For example, if you saved your IDC
files in a folder called Test in the wwwroot folder of your Web
Server, type:
http://<servername>/test/qryASPTest.html
Note that the URL depends upon where your files are located on the
Web Server.
- Type QUEEN, and then click Run Query.
Note that you receive the error message described in the "Symptoms" section
of this article.
For more information about configuring Microsoft Internet Information
Server (IIS) permissions, please refer to the IIS Help Index, and see
the following article in the Microsoft Knowledge Base:
Q160754 Error "HTTP/1.0 403 Access Forbidden" Browsing IDC Page
REFERENCES
For more information about the VBScript limit of 1022 characters, please
see the following article(s) in the Microsoft Knowledge Base:
Q174634 PRB: VBScript Compilation Error Message '800a03e9' Out of
Memory
Additional query words:
prb
Keywords : kberrmsg kbdta
Version : WINDOWS:2.0,97; winnt:3.0
Platform : WINDOWS winnt
Issue type : kbprb
|