Computing.Net > Forums > Windows Server 2003 > trouble connecting to database

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

trouble connecting to database

Reply to Message Icon

Name: gibby
Date: April 3, 2006 at 10:02:15 Pacific
OS: WS2003 Web
CPU/Ram: AMD Athlon XP 3200+/448 M
Product: HP
Comment:

I'm having trouble connecting to my database. Here's my specs:

Computer: AMD Athlon XP 3200+ with 2.20 GHz, 448 MB of RAM
OS: Windows Server 2003 Web Edition (SP1)
Database: MySQL 5.0.19
Database name: gibsdb

I created a new user named 'gib' with password 'gibpw' and host set to 'localhost'. Now I'm trying to connect to it from a website on the same machine using this user account. The website is programmed in ASP.NET and VB.NET. Here's the VB function that tries to connect to the database:

Function Connect() As String

Dim ConStr As String = "Server=localhost; Database=gibsdb;

uid=gib; pwd=gibpw; Provider=SQLOLEDB;"
Dim Connection As New OleDb.OleDbConnection(ConStr)
Connection.Open

End Function

This is called from the Page_Load() subroutine so it should connect (or fail to connect) upon loading the page. When I load the page, it gives me this error message:

Server Error in '/' Application.
----------------------

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Source Error:


Line 149: Dim ConStr As String = "Server=localhost; Database=gibsdb; uid=gib; pwd=gibpw; Provider=SQLOLEDB;"
Line 150: Dim Connection As New OleDb.OleDbConnection(ConStr)
Line 151: Connection.Open
Line 152:
Line 153:End Function

Source File: D:\Inetpub\public_websites\sandstoneestates\wwwroot\admin.aspx Line: 151

Stack Trace:


[OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
ASP.admin_aspx.Connect() in D:\Inetpub\public_websites\sandstoneestates\wwwroot\admin.aspx:151
ASP.admin_aspx.Page_Load() in D:\Inetpub\public_websites\sandstoneestates\wwwroot\admin.aspx:58
System.Web.Util.ArglessEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +10
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750


----------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300


I'm not sure how to interpret this. Is it a problem of accessing the database or of finding the database? Can anyone see what the problem might be?



Sponsored Link
Ads by Google

Response Number 1
Name: heropsycho2177
Date: April 3, 2006 at 12:02:33 Pacific
Reply:

This looks more like a MySQL problem, not a 2003 problem. This forum may not be the best place.

"It happens."


0
Reply to Message Icon

Related Posts

See More


Domain Controller slow bo... windows 2003 sbs and ts



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows Server 2003 Forum Home


Sponsored links

Ads by Google


Results for: trouble connecting to database

connecting to mysqlserver on win2k3 www.computing.net/answers/windows-2003/connecting-to-mysqlserver-on-win2k3/5667.html

can't connect to Host SQL Service www.computing.net/answers/windows-2003/cant-connect-to-host-sql-service-/7607.html

Connect to internet www.computing.net/answers/windows-2003/connect-to-internet-/7146.html