The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

I really don't think I'm stupid...

but I can't see a way to create tables in SqlServerExpress. How do you get to the database? I downloaded C# Express with SQL Server Express tagged along. Is there something else I need to install? It's not exactly intuitively obvious...

Thanks for any help.
Steve Hirsch Send private email
Tuesday, December 27, 2005
I haven't used C# Express, but other versions of Visual Studio have a "Server Explorer" window that you can use to connect to the database server and create databases and tables. (accesible from the View menu)

You can also download SQL Express Manager, although I really didn't found it useful. Very useless tool IMO.
sergio Send private email
Tuesday, December 27, 2005
There is something stupid here, but it's not you.

Having spent a fair amount of time puzzling over this exact issue myself, I raised the question at the "ask the experts" booth at the VS2005/SQL Server 2005 roll out event in Seattle.  The consensus was "hmmm... I guess you're right, you can't create tables in it."  The best suggestion was to add a Database project to your solution, add a Sql Script document to the project (I may not have the correct names for the project and document type, this is from memory), type "CREATE TABLE foo ..." into the Sql document, and then right mouse-click on the document to run the Sql commands.  (The first suggestion was to go to a DOS prompt and use osql, which I didn't really consider an acceptable answer in this day and age).
Don Send private email
Tuesday, December 27, 2005
Doh.  I got 3 hours sleep last night and spent 8 hours on the road today, which is why I just wrote a detailed answer to a question you didn't ask (sleep deprivation is an amazing thing... I was sure you asked how to create tables using the Database mgmt tool that ships with SqlExpress).  Sorry about that. 

Like the previous poster, I've just used VS2005 Pro and higher, so I'm afraid I can't answer the question you actually asked.  Is there any sort of "Server browser" window that you can bring up?
Don Send private email
Tuesday, December 27, 2005
Go here:

And download SQL Express Manager. It's a combination of the old Enterprise Manager and Query Analyzer. It's... well, it kinda sucks, really, but it'll let you create tables and do queries and build sprocs and all that sort of stuff.

If you're a command line guy, use the "sqlcmd" command line app; this is the 2005 equivalent of the old "osql" program.
Chris Tavares Send private email
Tuesday, December 27, 2005
Oh, the other thing you'll need to know that I never found documented anywhere obvious, but is extremely important.

When connecting to the database, you need to specify the instance name, which is SQLEXPRESS.

So, in your connection string, use:

Data Source=.\SQLEXPRESS

for the local machine, or:

Data Source=<server>\SQLEXPRESS

for a server on another box.

Be aware that by default SQLExpress will only communicate on the same box; you'll need to explicitly enable network connections.
Chris Tavares Send private email
Wednesday, December 28, 2005
You *can* make C# Express connect to remote databases? I didn't manage to do that and I read that is one of its limitations.
When you change the default instance from the options dialog, it automatically prepends "./" to make sure it is local.
smalltalk Send private email
Wednesday, December 28, 2005
Using the OLEDB provider, you can connect to any datasource you want, as long as your connecting via code.

The fancy wizards and such will only connect to a local SQL Express install in the Express Editions of Visual Studio.
Eric D. Burdo Send private email
Wednesday, December 28, 2005
Thanks everybody. I specified SQLEXPRESS in the connect string (nothing else) and it worked fine. I'm glad that there's a command line interface, didn't know about it.

How do you set up the OLEDB functionality? I have an Oracle instance on the PC with the database, I'm looking into migrating it to SQL Server for price reasons.

Thanks again.
Steve Hirsch Send private email
Wednesday, December 28, 2005
Steve, do you know about OracleExpress database?
Free, and it works, and it can be installed in about 10 minutes. And setup is only one file, about 150Mb.
Thursday, December 29, 2005
Actually I am. I'd much rather work with Oracle because I already know Oracle (I've actually installed full instances on PC's many times) For the small number of users, I can't really justify Oracle's price for my client, so the effort to learn yet another &*^%&&*& tool.

If I can get this to work, then I will look into migrating it to real SQL Server.
Steve Hirsch Send private email
Thursday, December 29, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz