ASP + ACCESS on 64-bit

Source: Internet
Author: User
Tags support microsoft

Today, I helped people solve an old ASP Website.

There is no problem on the original machine, and there is always a problem after changing one machine. There is no log processing in the original code, and there is no error. These things are necessary for coding.

ASP has not been completed for a long time. I forgot to add debugging information step by step. I finally added a debugging code to the end of the connection to find the real error cause:

Conn. Open connstr
If err <> 0 then
Response. Write "11111 <br> <B>" & err. Description & "</B>"
End if
End if

Error message:No provider is specified, and no default provider is assigned.

After half a day, Baidu finally found a problem with the 64-bit system, because the new machine is equipped with a 64-bit machine.

This is because your system is 64-bit, And the 64-bit operating system does not support Microsoft ole db provider for jet drivers, nor does it support earlier Microsoft Access Driver (*. MDB.

Microsoft website has the following instructions: (See: http://msdn2.microsoft.com/zh-cn/library/ms141766.aspx)
Microsoft ole db provider for jet for access and Excel databases are not available in 64-bit versions.
That is to say, the following two connection strings are no longer working properly:
"Provider = Microsoft. Jet. oledb.4.0; Data Source =" & server. mappath (db)
"Driver = Microsoft Access Driver (*. mdb); DBQ =" & server. mappath (db)
Therefore, we have to modify the IIS runtime environment to 32-bit

In addition, SQL data connections can be run on 64-bit machines. The link string is:
"Provider = sqloledb; Data Source =" & sqllocalname & "; uid =" & sqlusername & "; Pwd =" & sqlpassword & "; database =" & sqldatabasename

To change IIS to 32-bit, follow these steps: ASP. NET 2.0, 32-bit
To run the 32-bit version of ASP. NET 2.0, follow these steps:
1. Click Start, click Run, type cmd, and click OK ".
2. type the following command to enable the 32-Bit mode:
Cscript % systemdrive % \ Inetpub \ adminscripts \ adsutil. vbs set w3svc/apppools/enable32bitapponwin64 1
3. type the following command to install ASP. NET 2.0 (32-bit) and install script ing in the IIS root directory:
% SystemRoot % \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regiis.exe-I
4. Make sure that the status of ASP. NET 2.0.40607 (32-bit) is enabled in the Web Service Extension list of Internet Information Service Manager.

ASP. NET 2.0, 64-bit
To run the 64-bit version of ASP. NET 2.0, follow these steps:
1. Click Start, click Run, type cmd, and click OK ".
2. type the following command to disable the 32-Bit mode:
Cscript % systemdrive % \ Inetpub \ adminscripts \ adsutil. vbs set w3svc/apppools/enable32bitapponwin64 0
3. type the following command to install ASP. NET 2.0 and install script ing in the IIS root directory:
% SystemRoot % \ Microsoft. NET \ framework64 \ v2.0.50727 \ aspnet_regiis.exe-I
4. Make sure that the ASP. Net 2.0.40607 status is set to allow in the Web Service Extension list of Internet Information Service Manager.
Note: The internal version of ASP. NET 2.0 may change as the internal version of the current release changes. These steps apply to the internal version 2.0.40607.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.