|
-
Apr 17th, 2009, 04:47 AM
#1
Thread Starter
Hyperactive Member
Connecting Successfully to SQL Server 2008
Hi everyone. I'm going to tryto be as descriptive as possible becase I'm sure that this is a deep problem.
I'm basically trying to learn how to use ASP.NET, SQL Server 2008, and Visual Web Developer 2008, and the C# language (for ASP.NET). I'm familiar with Apache Tomcat and JSP so I figured I might as well try the Microsoft end of the server scripting world.
The website I created with VWD contains just one simple page with six ASP tagged controls on it. There are four textboxes and two buttons: one to submit the information to the server and the other to clear out the fields. Obviously, the behavior for the clear button is straightforward enough to where it doesn't need any serious conversation. What I am having problems with, if you haven't guessed it by now, is the submit button.
In the method call for the submit button I attempt to open a connection to an active instance of SQL Server and access the database that I'm looking for within it. This is where I get my error. Calling the Open method from an instance of SqlConnection returns an infamous error 40 message saying that, basically, the code can't find an instance of SQL Server. Now here are the things that I've tried but haven't worked:
- Double checked to make sure that an instance of SQL Server was running while the website was running, which it was. I've checked this numerous times.
- Made sure the port being used by both the website and SQL Server was not being blocked by my firewall. I even went as far as adding the ports to my exceptions list.
- Enabled TCP/IP in SQL Server. I don't really know why it was disabled by default but I'm not Microsoft.
- I'm not sure if this makes any difference at all but I even synchronized the ports that the website and SQL Server uses. When I found out this didn't work I reset the ports back to what they were in the first place.
Short of doing all this I'm not sure what else I can do to get this to work. I don't remember Tomcat giving me this much trouble before but I'm really trying hard not to give up on this. Any help would be greatly appreciated. Thanks in advance.
Last edited by GamerMax5; Apr 17th, 2009 at 04:51 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|