Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 SQL server 2005 connection (not express)

Author  Topic 

memento
Starting Member

16 Posts

Posted - 2006-05-24 : 09:21:18
I am currenlty developing a web interface to access an sql server 2005 database. I was reading tutorial “Web Development with Visual Web Developer 2005 Express Edition and SQL Server 2005 Express Edition, Part 1” in[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/VWD_SSE.asp?frame=true[/url]



I found a problem that is proving quite hard to solve. Instead of connecting to an slq 2005 express server, I want to connect to my MSSQLSERVER.



When I add a new database item to the project, I can only create successfully a mdf file if I have the SQLExpress service enabled.



I have enabled remote connections in the SQLSERVER service and opened all combinations of pipe, tcp/ip and shared memory, even though I am connection to a local database.



In the data connections of Visual studio I can connect to existing databases of MSSQLSERVER if I use ___ but, if I use Microsoft SQL Server database file (Sqlclient) as data source and create a new database name I get the error:



An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)



I have changed the data source from .\SQLExpress to .\MSSQLSERVER in the advanced tab. I am using windows authentication to connect to the database.



Trying to change the SQL Server Instance Name in the tools->Options tab from SQLExpress to MSSQLSERVER only make things worse, because afterwards I can’t even “add new itemà database” to the project, because it gives the error:



Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251







Do you have any idea why I can’t connect to SQLServer? Is there any configuration that I have to do in SQL to make this work or does Visual studio only work with Express?

mr_mist
Grunnio

1870 Posts

Posted - 2006-05-24 : 09:52:16
Have you changed the configuration option in SQL Surface area configuration on the SQL Server / configuration for services and connections / database engine / local and remote connections using both TCP/IP and named pipes?



-------
Moo. :)
Go to Top of Page

memento
Starting Member

16 Posts

Posted - 2006-05-24 : 10:43:41
quote:
Originally posted by mr_mist

Have you changed the configuration option in SQL Surface area configuration on the SQL Server / configuration for services and connections / database engine / local and remote connections using both TCP/IP and named pipes?

-----
Moo. :)



Yes, it's set to both.
Go to Top of Page

memento
Starting Member

16 Posts

Posted - 2006-05-24 : 11:03:25
In other words...do you know if it's possible to create such an application without SQL Express? I am starting to think this is only intended to work with this limited version...
Go to Top of Page

JBelthoff
Posting Yak Master

173 Posts

Posted - 2006-05-24 : 13:38:37
Doesn't Visual Web Devloper give you a test option before adding the database to the project?



JBelthoff
D
odge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!
Asp Hoting Provider
Go to Top of Page

JBelthoff
Posting Yak Master

173 Posts

Posted - 2006-05-24 : 13:44:43
Yes I just checked, when you add a database connection to the project you go through the wizard form and select the server, then select the login, windows or sql login, than there is a button on the lower left that says "Test Connection".

You can add any kind of dbase that you want as long as you can connect to it.



JBelthoff
D
odge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!
Asp Hoting Provider
Go to Top of Page

memento
Starting Member

16 Posts

Posted - 2006-05-24 : 14:23:42
I believe that is for database connection, not to add a database, right? Ie, the databases I can connect to (I can create connections to any db with no probl) won't be available in the solution explorer like it should (at least from the tutorial)
Go to Top of Page

JBelthoff
Posting Yak Master

173 Posts

Posted - 2006-05-24 : 18:51:25
I do not believe that Web Developer express allows you to create databases other than SQL Server 2005 Express.

You would first need to create an MS Sql Server 2000 database and then add a connection to it in Web Developer.

You would need MSDE to do a sql server 2000 database on your local machine. Or, of course, sql server 2000.

After you connect to it it will be available in the solution explorer, but if you want the full features of creating databases and all of the other bells and whistles you would need an Architect version of Visual Studios.





JBelthoff
D
odge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!
Asp Web Hoting Provider
Go to Top of Page
   

- Advertisement -