Microsoft Knowledge Base Email Alertz

(820928) - When you use your browser to view a database on a Web page that you created in FrontPage 2003, you receive the following error message: Error: SQL Server does not exist or access denied.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 820928 - Last Review: January 6, 2006 - Revision: 3.5

You receive an "SQL Server does not exist or access denied" error message when you browse an ASP.NET Web page

SYMPTOMS

When you use your browser to view a database on a Web page that you created in FrontPage 2003, you receive the following error message:
Error: SQL Server does not exist or access denied.

CAUSE

This problem may occur if you use Microsoft ASP.NET version 1.0 to connect to a Data Source Name (DSN) connection to your database when you create your Web page in FrontPage 2003. DSN uses the OdbcDataAdapter to connect to a database. ASP.NET version1.0 uses the OleDbDataAdapter to connect to a database. ASP.NET version 1.0 does not support the use of the OdbcDataAdapter.

RESOLUTION

To resolve this problem, download and install ASP.NET version 1.1 on the computer that hosts the Web page, and then edit the Fpdbnet.cs file to change the database connection. ASP.NET version 1.1 includes support for the OdbcDataAdapter. To download ASP.NET version 1.1, visit the following ASP.NET Web page:
http://www.asp.net/Default.aspx?tabindex=0&tabid=1 (http://www.asp.net/Default.aspx?tabindex=0&tabid=1)
To edit the Fpdbnet.cs file and make the required changes, follow these steps:
  1. Click Start, right-click My Computer, and then click Explore.
  2. Expand My Documents/My Web Sites/ _fpclass.
  3. Right-click Fpdbnet.cs, and then click Open.
  4. If the file does not open, in the Windows dialog box, click Select the program from a list, and then click OK.

    In the Programs list, click Notepad, and then click OK.
  5. Click Edit, and then click Replace.
  6. In the Find what box, type Oledb, and in the Replace with box, type Odbc.
  7. Click Replace all, and then close the Replace dialog box.
  8. Find the three lines that say DataTable literalInfo, and then type a ; (semicolon) at the beginning of each line to prevent these lines from processing.
  9. In Microsoft Windows Explorer, expand My Documents/My Web Sites/ _vti_cnf, right-click the Global.asa file, and then click Edit.
  10. Find the appropriate database connection and copy the connection string (for example, DSN=SQLDSN;Driver={SQL Driver}).
  11. Click Fpdbnet.cs and find the line that says _dbConn = new OdbcConnection(strConnStr.ToString()).
  12. Paste the database connection string that you copied from the Global.asa file in the brackets of this line so that the line now reads _dbConn = new OdbcConnection(copied_connection_string_pasted_here).
  13. Save and close Fpdbnet.cs, close Global.asa, and then quit Windows Explorer.
  14. Open your Web page in your browser.

    You can now view the database.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

APPLIES TO
  • Microsoft Office FrontPage 2003
Keywords: 
kbasp kbdatabase kberrmsg kbprb KB820928
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate