Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SQL Connection Error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL Connection Error

 Post Reply Post Reply
Author
kjmay View Drop Down
Newbie
Newbie


Joined: 02 June 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kjmay Quote  Post ReplyReply Direct Link To This Post Topic: SQL Connection Error
    Posted: 02 June 2009 at 9:10pm
Running extranet site in-house on Windows Server 2000 using Windows NT authentication, IIS 5, accessing SQL 2005 on another server.  All other db apps on this extranet connecting to the same SQL 2005 server are running without problem.
 
I cannot get database_connection.asp to run correctly.  Our DB copied the scripts from 'msSQL_server_setup.asp' and created SQL 2005 tables through Query Analyzer.  The following code on a quick test page I created in the \forum subdirectory connects to the WebWizForums SQL database and successfully loops through writing returns values from the two records in the  tblAuthor table.
 
 set conn = Server.CreateObject("ADODB.Connection")
 conn.Open "Provider=SQLOLEDB.1;Password=CorrectPassword;User ID=CorrectID;Initial Catalog=WebWizForums;Data Source=CorrectServerName"
 Set rsReview = Server.CreateObject("ADODB.Recordset")
 vSQL = "SELECT * from tblAuthor"
 
 rsReview.Open vSQL, conn, 3, 3
 ...
 
Nothing I've tried in database_connection.asp will run correctly (name of server, TCP/IP #, commenting out code and inserting my own connection string, etc.).  I keep getting the error below when going to CorrectURL/forum or CorrectURL/forum/admin.asp

 
Server Error in Forum Application
An error has occurred while connecting to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_db_connection
File Name:- common.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Any suggestions would be greatly appreciated.
 
Thanks,
Kathy
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2009 at 7:22am
You can not use NT Authentication and a trusted connection. The SQL Server needs to be setup in mixed mode with TCP/IP connections enabled.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.