Windows Web Hosting by Qualispace

Home   ->   MS SQL & MS Access

Answer Requesting for MSSQL database ? 

    Answer In order to request for MS SQL database for your website, you can send log a request via your WeCARE account or alternatively send an email to Sales@QualiSpace.com. Your order will be processed on receiving the necessary payment for the MS SQL Database.
 
 
Answer How to get connected to the remote MS SQL database via a MSSQL client ? 

    Answer To connect to a remote MS SQL database through a MS SQL client or Enterprise Manager, perform the steps given below

      
  1. Register the Server Alias
  • Open the Client Network Utility from Start -> Programs -> Microsoft SQL Server -> Client Network Utility
  • Go to Alias Tab & Click on Add Button
  • Add the server alias (Enter the IP address). Select the Network Library as TCP/IP.
  • Uncheck the check Box Dynamically Determine Port and specify the port as 1422
  1. Connect to the MS SQL Server
  • Open the Enterprise Manager from Start -> Programs -> Microsoft SQL Server -> Enterprise Manager
  • Right Click on Microsoft SQL Server
  • Click on new SQL Server Registration
  • Click on Next
  • Add the newly created Server Alias
  • Connect using SQL Server login assigned by the hosting administrator.
  • Enter the login name and password.
  • Click on Next
  • Keep the default setting
  • Click on Finish. The server alias created will be displayed in the Enterprise Manager
  • Right Click on the server alias created and connect. Expand the server alias and you will see Database Folder with other options
  • Expand Database and you can access your Database
Answer What is the connection strings in our code/snippets to get connected to the MSSQL database ? 
 
Answer You can utilize the below given connection strings in your code/snippets to get connected to the MSSQL database
 
set conn = server.createobject("ADODB.Connection") conn.open "provider=sqloledb;server=<Ip_address>;uid=username;pwd=password;database=databasename"
 
(*** replace <Ip_address> with the IP address provided to you with the hosting instructions, username with the username, password with the password and databasename with the databasename provided to you when the database setup was done)
Answer What are the Commonly Encountered Issues with MSSQL ? 

    Answer   The following are the commonly encountered issues with MSSQL
1. Clients cannot connect even after registering a connection in Enterprise Manager

Solution: This problem normally occurs when the proper network library is not selected while registering the server or wrong port is selected. Open the Client Network Utility to check if the server is registered correctly. Click here for the steps to register server alias.

2. SQL Server is unavailable or does not exist. Specified SQL Sever not found.

If you get the error in the script, then check the connection string. This problem normally occurs when either the connection string is wrong or the SQL server is not currently running. If you have not included the port in the connection string, then specify the port and it will solve the problem. A Sample connection string is given below

set conn = Server.CreateObject("ADODB.Connection")

conn.open "provider=sqloledb;server=<Ip_address>;uid=username;pwd=password;database=databasename"

(*** replace <Ip_address> with the IP address provided to you with the hosting instructions, username with the username, password with the password and databasename with the databasename provided to you when the database setup was done)

 
Answer Why do I get "General error Unable to open registry key" error ? 

    Answer   This error normally occurs when you are using a DSN-less connection in your script. This happens because of the wrong path of the database file in your connection string. If you are giving the physical path of the database in the connection string, then make sure that the path provided is correct. If you define the virtual path in the connection string, then make sure that your script and the database are uploaded in the same directory.
 
Answer Why I get the error message: Microsoft OLE DB Provider for ODBC Drivers error 80004005 [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't use (unknown); file already in use ? 

    Answer   This error occurs because of inappropriate permissions to the database file. If you come across this error, then log a support request from http://helpdesk.qualispace.com and mention the database file to which the permission is to be set.

Additionally you can also come across the following error messages because of the permission issue

Microsoft OLE dB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file (unknown). It is already opened exclusively by another user, or you need permission to view its data.
-or-
Microsoft OLE dB Provider for ODBC Drivers error 80004005 [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file.
 

 
Answer How to set DSNless Connection String for MS-ACCESS ? 

    Answer   DSNless Connection String
            -----------------------------------------

If you wish to use a DSNless connection to get connected to the Access Database, you can use the below given connection string in your code/snippets.

set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="<physical_path>/<database_file >"

Note:- Replace <physical_path>/<database_file > with the physical path of your database. If you do not know the physical path, you can ask for the same by creating a support request at http://helpdesk.qualispace.com.
 
Answer What is the connection string using DSN for MS-ACCESS ? 

    Answer   Connection String using DSN
            -----------------------------------------

When you have opted for a database we configure the DSN with an access database, in this case you can utilize the below given connection strings in your code/snippets to get connected to the Access Database

set conn = server.createobject("ADODB.Connection")
conn.Open "Data Source=dsn_name"

Note: - Replace dsn_name in the above string with the DSN name provided to you for your database. - When you are uploading your database file make sure that you upload your .mdb file inside the db folder because this is the path to which the DSN is configured and in case you want your database file to be be in a separate folder than you have to create a support ticket through http://helpdesk.qualispace.com and mention the new path of the database so that the we can configure the DSN accordingly)
 
Answer Extra note on Access Database security ? 

    Answer     An access database is stored in form of a file having a .mdb extension on the server. Usually people keep that file inside the Web folder which is the document root of websites on the server. In this case if a general surfer knows the complete path of the database file then he can retrieve the same using http method which is not desirable since a database contains a lot of important and sensitive information. To avoid this, the .mdb file should be stored inside the folder named db which is outside the www directory of the website and is thus not accessible to a general surfer. The database which is inside the db folder can be accessed using the asp code inside the www folder.

Note: If the access database is used only for data retrieval and it is not written dynamically then the permission of database file should be kept as read only for the system user that IIS uses for anonymous access to the website. You can get these permissions set by contacting the QualiSpace support staff by creating a support ticket at http://helpdesk.qualispace.com.