Q/. How do I configure the YourVirtualStore so it can see the database? A/. Data Base Summary
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 administration you still need to follow Microsoft rules for making the directory write able.
Data Base Problems
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). Click here for the proper set-up
- The other possibility is that the Microsoft rules for configuration the database have not been followed. We have created a FAQ at http://www.vpasp.com/virtprog/info/faq_setup.htm
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 tool - shopdbtest.asp
Our shopdbtest.asp (diagnostic tool) tests if the directory has been set-up correctly to read and write the database.
Step 1 - What is the Problem.
First run the diagnostic tool shopdbtest.asp If this fails then the permissions for Windows NT/2000 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 shopa_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.
Step 2 - Fixing NT/2000 Errors.
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 http://www.vpasp.com/virtprog/info/faq_setup.htm
OR
The problem may simply be a configuration setting in YourVirtualStore.
Step 3 - Configuring YourVirtualStore Properly
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
- ODBC (DSN connection)
- SQL Server
Configuring Access DSNless connection (default)
The directory in which the Shopping300.mdb file is placed must have read/write permissions set for IUSR_MachineName.
The shop$config.asp settings should be as follows:
const xDatabase="shopping450_yvs" 'Database name const xdblocation="..\yourpathtodatabase" Relative path to shopping300.mdb const xdatabasetype=""
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 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="shopping450_yvs" const xdblocation="c:\physicalpath\yourvirtualstore" 'Physical Path to database const xdatabasetype="Drive"
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="" 'Not required const xdatabasetype="ODBC"
Please run the diagnostic tool shopdbtest.asp and make sure the database can be read and written.
Configuring SQL Server
This is for direct connection to SQL Server. The shop$config.asp settings should be as follows:
const xDatabase="shopping450_yvs" 'Database name const xdblocation="" 'Not Required const xdatabasetype="SQLServer" ' SQLServer const xSQLUser="youruserid" ' SQL Server user const xSQLPwd="yourpassword" ' SQL Server password const xSQLServer="www.yourserver,com" ' SQL Server name or IP address printable version Back to Main Page |