| Q/. What databases can I use with the YourVirtualStore and how do I set them up? A/. YourVirtualStore supports 2 different databases: Microsoft Access and Microsoft SQL Server. Not every database is supported with every YourVirtualStore Version.
- YourVirtualStore Windows Version supports Access and SQL Server.
The most common problem in setting up YourVirtualStore is getting the database definitions to work. It is normally only a few lines in one file, shop$config.asp. This file tells YourVirtualStore 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.
In most YourVirtualStore 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 YourVirtualStore 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 YourVirtualStore cannot open the database.
The solution to the problem is either:
- You have not told YourVirtualStore where the database is located or you have told
- YourVirtualStore incorrectly. YourVirtualStore really only needs to know where the database is, what type it is
(Access, ODBC, SQL Server).
- The other possibility is that the Microsoft rules for configuration the database
have not been followed. We have created a FAQ at YourVirtualStore Set Up 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 YourVirtualStore 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.
- 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)
- 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 YourVIrtualStore Set Up
OR
The problem may simply be a configuration setting in YourVirtualStore which is described below.
Access database set-up
YourVirtualStore 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 YourVirtualStore 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 YourVirtualStore web application installed on your Web Server. All the settings required for YourVirtualStore operation are in a single file shop$config.asp. The relevant settings are as follows. It describes
- Access Database DSNless connection
- Access Database Specific drive location
- ODBC (DSN connection)
Configuring Access DSNless connection (default)
The directory in which the shopping500.mdb file is placed must have read/write permissions set for IUSR_MachineName.
The shop$config.asp settings should be as follows:
const xDatabase="shopping500_yvs" const xdblocation="..\yourpathtodatabase" const xdatabasetype=""
The xdblocation is using the Windows relative addressing to tell YourVirtualStore the location of the folder relative to where YourVirtualStore is installed.
We recommend that the database directory is outside of web space
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 YourVirtualStore.
Configuring Access DSNless (physical address)
Access Database, using the DRIVE option. if your 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_yvs" const xdblocation="c:\physicalpath\yvs500" 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 by must have the value show. the xdatabase type is a special YourVirtualStore keyword ODBC.
SQL Server Set-up
SQL Server is slightly more complicated than Microsoft Access because you must first create the database and the build the YourVirtualStore tables. YourVirtualStore 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.yourserver,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"
Still need help?
There is almost never a cause for modifying our code to get YourVirtualStore to work. The problem will be:
- Incorrect shop$config.asp setting
- Incorrect Windows Permissions setting which YourVirtualStore support cannot fix. Only your web hosting company or system administrator can alter Windows permissions.
- Incorrect userid/password/server name when using SQL Server
If you still need assistance please contact our support staff and provide all of the following:
- Direct URL to where YourVirtualStore is installed
- Error message you are receiving
- The filename and line number on which the error is occurring
printable version Back to Main Page |