Click to See Complete Forum and Search --> : ODBC driver not working?


foamy
November 27th, 2007, 09:54 AM
Hi guys, it's me again...

This time, I'm using MS SQL Server 2005 Express Edition and I want to connect to this from my newly formed C# app... However, in Visual Studio I only seem to have the option of connecting to a SQL Server Database File, and not an actual database. How do I go about adding the option of connecting to a SQL server database? I've tried messing around with the ODBC drivers but I just get an error saying that the server doesn't exist even though I installed it yesterday and sqlsrv.exe or what it's called is running...

help?

Shuja Ali
November 28th, 2007, 03:40 AM
You are probably using the Express edition of Visual Studio. You can directly write code to connect to the SQL Express database. And in the above case the "SQL Server Database file" is actually the database (the .mdb) file present on the SQL Server.

foamy
November 30th, 2007, 04:08 AM
Is that funtionality really cut out of the Express Edition? .. burn

Anyway, I got a connection string working now so no biggie... just wanted to know if I was doing something wrong

Shuja Ali
November 30th, 2007, 05:26 AM
No nothing wrong with your approach. Actually in express editions, you can only connect to local databases and not the remote ones. However, in real world we seldom use the wizards. Most of the things are handled in code, so you are good. :)