VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497
Live Chat

ODBC

Help Topics --> Hosting... --> General hosting questions
ODBC

VP-ASP supports three different databases: Microsoft Access, Microsoft SQL Server and MYSQL. Not every database is supported with every VP-ASP Version.

  • VP-ASP Value, Plus and Deluxe all support Access, MySQL and SQL Server.
  • The VP-ASP Starter Pac and Starter Extras Pac only support Access

The most common problem in setting up VP-ASP is getting the database definitions to work. It is normally only a few lines in one file, shop$config.asp. This file tells VP-ASP the name of the database, the type and the physical location. This file is specific to your shop and must be edited with the correct values. Examples are shown below.

The second most common problem is setting correct database permissions for Access database.

In most VP-ASP shops the database can be configured within minutes.
The details shown here are when you have problems

Problem Summary

The most common help request we receive is the message below.
This message means that VP-ASP cannot open the database.

ADODB.Recordset error '800a0e7d'
The application requested an operation on an object with a reference to a closed or invalid Connection object.


This message means that VP-ASP cannot open the database.
The solution to the problem is either:

  • You have not told VP-ASP where the database is located or you have told VP-ASP incorrectly. VP-ASP really only needs to know where the database is, what type it is
    (Access, ODBC, SQL Server, MYSQL).
  • The other possibility is that the Microsoft rules for configuration the database
    have not been followed. We have created a FAQ at Set Up Faq
    This is a list of all the types of Windows NT/2000/98 configuration problems that have
    been reported to us. It also links back to Microsoft knowledge base articles related to NT/2000 configuration.
  • A third possibility, but more rare, is that you are using a version of Windows that does not support the Access database you are using. If VP-ASP cannot read the database, this is a good possibility. Most Windows operating systems support both Access 97 and Access 2000 but if you are using an old NT system, it may not have Access 2000 support built in and if you are using the latest Windows XP it may not have support for Access 97 built in. We can help you by providing the database you need.

Diagnostic Tools

Our diag_dbtest diagnostic tool or shopdbtest for releases prior to 5.0, tests if the directory has been set-up correctly to read and write the database.

  1. First run the diagnostic tool diag_dbtest.asp
    If this fails then the permissions for Windows NT/2000/XP IUSR are not correct OR you have the wrong settings in shop$config.asp (see below)
  2. In addition, after an error occurs, you can type diag_sessionlist.asp. We store the exact open failure message in a session variable called "OpenError". This may give you a hint on why the database cannot be opened. Many of the Microsoft error messages are listed here.

Database configuration is particular to each Server. Depending on whether you are hosting with an ISP or (locally) on your own PC/network you should pass the above information to your hosting company (ISP) or System Administrator. Direct them to this URL

OR

The problem may simply be a configuration setting in VP-ASP which is described below.


Access database set-up

VP-ASP uses an Access database (or SQL Server). It must be able to read and write this database. For example it needs to write the customer details when they shop.
Microsoft has put protection into the Windows to prevent hackers but it also sometimes prevents databases from working properly. Most web hosting companies know this and create a separate directory just for the database. On your web host, you simply copy the database to that special directory and tell VP-ASP where you put it.

If you are doing your own NT/2000/XP administration you still need to follow Microsoft rules for making the directory write able.

This information is to assist you in configuring the VP-ASP web application installed on your Web Server. All the settings required for VP-ASP operation are in a single file shop$config.asp. The relevant settings are as follows. It describes

  1. Access Database DSNless connection
  2. Access Database Specific drive location
  3. ODBC (DSN connection)

Configuring Access DSNless connection (default)
The directory in which the databaseName.mdb (or by default shopping600.mdb) file is placed must have read/write permissions set for IUSR_MachineName.

The shop$config.asp settings should be as follows:

const xDatabase="shopping600"
const xdblocation="yourpathtodatabase"
const xdatabasetype=""


The xdblocation is using the Windows relative addressing to tell VP-ASP the location of the folder relative to where VP-ASP is installed.

We recommend that the database directory is outside of web space
as this prevents hackers from downloading the database via a web browser. Most web hosting companies make their directories read only. You may have put the database into the same directory as the scripts and therefore the database cannot be written to. Most web hosting companies that deal with databases on a regular basis know this and provide a separate directory for the database. This means on production systems the database cannot be in the same directory as the rest of VP-ASP.

Configuring Access DSNless (physical address)

Access Database, using the DRIVE option. if you simply want to point to the exact physical location of the directory holding the database.

The shop$config.asp settings should be as follows:

const xDatabase="shopping500"
const xdblocation="c:\physicalpath\shopping"
const xdatabasetype="Drive"


The xdblocation is the full Windows location of the folder where the database exist. Do not repeat the database name in this value.

Configuring ODBC (DSN connection)

Some web hosting companies prefer you to use a DSN or ODBC connection to the database. If this is the case a system DSN needs to be configured. You will be supplied a DSN name by your web hosting company.
The shop$config.asp settings should be as follows:

const xDatabase="DSN=yourdsname"
const xdblocation=""
const xdatabasetype="ODBC"

xdblocation is unused but must have the value shown above. The xdatabase type is a special VP-ASP keyword ODBC.


SQL Server Set-up

SQL Server is slightly more complicated than Microsoft Access because you must first create the database and then build the VP-ASP tables. VP-ASP makes this easy to do with our supplied scripts. For a more complete summary click here. Once the tables are created using our supplied scripts, the shop$config.asp file should look like this.

This is for direct connection to SQL Server. The shop$config.asp settings should be as follows:

const xDatabase="yourdatabasename"
const xdblocation=""
const xdatabasetype="SQLServer"
const xSQLUser="youruserid"
const xSQLPwd="yourpassword"
const xSQLServer="www.vpasp.com"

The xsqlserver value will be supplied to you by your web hosting company or if running on your own PC it is probably going to be "localhost" or "127.0.0.1"

MYSQL Server Set-up

MYSQL requires that you build the VP-ASP tables using our supplied scripts. Many web hosting companies either create the MYSQL database for you or allow you to create it using a tool they provide. For a detailed discussion on this click here.

Once the database and the tables are created, and you have used the VP-ASP supplied mysqlcreate.asp tool to build the VP-ASP tables, the shop$config.asp file should look something like this.

const xDatabase="yourdatabasename"
const xdblocation=""
const xdatabasetype="MYSQL"
const xSQLUser="youruserid"
const xSQLPwd="yourpassword"
const xSQLServer="www.vpasp.com"


The xsqlserver value will be supplied to you by your web hosting company or if running on your own PC it is probably going to be "localhost" or "127.0.0.1". The xdblocation is not used but must be set as shown. The xdatabasetype is a special VP-ASP keyword "MYSQL".

Still need help

There is almost never a cause for modifying our code to get VP-ASP to work. The problem will be:

Incorrect shop$config.asp setting
Incorrect Windows Permissions setting which VP-ASP support cannot fix. Only your web hosting company or system administrator can alter Windows permissions.
Incorrect userid/password/server name when using SQL Server or MYSQL
If you still need assistance please contact our support staff and provide all of the following:

Direct URL to where VP-ASP is installed
Error message you are receiving
The filename and line number on which the error is occurring



Times Viewed:
9217
Added By:
Steve Baldwin
Date Created:
12/8/2005
Last Updated:
3/1/2007
Back Search other topics Submit a Ticket