Hello.
Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro,
SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.
I just spent the whole day trying to figure out why my program stopped
updating the database when it was working perfectly fine last night.
It was working exactly the way i wanted it to, but i had to be a real smart
guy and try to move the database from the \C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data folder to where my VS program was, so that when i
go to my clients to install everything, i wouldn't have to track down files
in more than one location. Boy, i thought i was going to be so efficient.
After i did that, everytime i tried a test, it would not update the database
even though it was not giving me errors. I even watched it go through the
code and not error out on the add rows etc.
I ran the Show Table Data in server explorer and the Preview Data in DataSet
designer and no records would show up. When i ran the Preview Data from the
data source window, it would always give this error:
"An attempt to attach an auto-named database for file C:\Program
Files\Microsoft Visual Studio 8\Common7\IDE\INVHST.mdf failed. A database
with the same name exists, or specified file cannot be opened, or it is
located on UNC share."
Well, it turns out that after moving the database back to the original
folder, everything ran fine again. I can't explain why it would not work
after moving the database to a different location.
Which leads me to a question. How am i going to bring this stuff to a
client and install it there so that i don't run into this problem there?
Any help would be gratefully appreciated.
Thanks,
Tony