I have a program that should connect to my_local_db. I check the MSDE is running but the program still show no data. So I check the ODBC DSN configuration and there I found the problem: I try to set my_local_db as the default db but it is not in the list. I know in SQL server I can attach my_local_db using query analyzer and that would solve the problem, but in MSDE there's no way for me to do that. Any suggestion? Thanks!
BTW, OSQL is a command line utitility. It is included in the Binn folder under the MSSQL7 folder. You cannot run it by double-clicking its icon, you must run it from the command line like this: C:\MSSQL7\Binn\OSQL -U username -P password and press enter or the run button. You should see a > (greter than) sign with a number one if osql opened. Then you can type a line: sp_attach_db 'dbname','dbpath' and press enter. You will get another > sign with a number two. Type GO and press enter. You will get a message if the database attached properly.
I tried the osql command and got the message "Successfully attached database 'my_local_db'" but when I go back into the ODBC my db is still not attached even though the MSDE is running correctly. This is a Windows 2000 computer and MSDE 1.0. Anyone knows what else I can try?
How do you know that the database it not attached? Just because the ODBC screen isn't showing the database doesn't mean that it is not attached. Which account are you using for your DSN? Is that account orphaned (if it's sa then it's not orphaned)? Using OSQL, what do you get when you run this: SELECT name from master.dbo.sysdatabases?