Database Gets Corrupted

  • Thread starter Thread starter Rajesh Pershad
  • Start date Start date
R

Rajesh Pershad

Hi

I'm fairly new to C#. I am using VS2005 and SQL 2005 both express
versions. I create a table in SQL Server and populate it with data. I
then go to VS and create a new C# windows application. I then add a new
datasourse for the database and tables just created. When I try to test
the connection, I get a message saying that the database is in use with
another program. I then close Query Analyser. When I try to test the
connection I get an error message saying the user is not using a secure
connection or something like that. I kept deleting the DB and tried
again. I'm not sure how but eventually I managed to get a successful
connection to the DB.

I included Table1 and Table2 on the form. Table1 displayed the data as
fields and Table2 was in a datagrid. The autocontrols were automatically
added above. After running the application and exitting, I noticed that
I could not see the DB in Query Analyser and when I tried to connect
again it gave and error that the DB did not exist. When I created
another DB and tried the same thing - Query Analyser show the DB as
corrupt.

I tried resetting the status of the DB but it says that the DB status is
fine.

Could someone please advise.


Thanks in advance.
Rajesh
 
Hi

I'm fairly new to C#. I am using VS2005 and SQL 2005 both express
versions. I create a table in SQL Server and populate it with data. I
then go to VS and create a new C# windows application. I then add a new
datasourse for the database and tables just created. When I try to test
the connection, I get a message saying that the database is in use with
another program. I then close Query Analyser. When I try to test the
connection I get an error message saying the user is not using a secure
connection or something like that. I kept deleting the DB and tried
again. I'm not sure how but eventually I managed to get a successful
connection to the DB.

I included Table1 and Table2 on the form. Table1 displayed the data as
fields and Table2 was in a datagrid. The autocontrols were automatically
added above. After running the application and exitting, I noticed that
I could not see the DB in Query Analyser and when I tried to connect
again it gave and error that the DB did not exist. When I created
another DB and tried the same thing - Query Analyser show the DB as
corrupt.

I tried resetting the status of the DB but it says that the DB status is
fine.

Could someone please advise.


Thanks in advance.
Rajesh

I think you are trying to use the SQL Server 2000 Query Analyzer to view SQL
Server 2005 Express. If you are, you cannot do that. There is no Query
Analyzer for SQL Server 2005. You must use the Management Studio made for
Express instead. You can download that for free from Microsoft.

That's what I think is wrong, from reading your post. I could be wrong though.

In addition. I see no relation to C# in your question, which should have been
posted to the ADO.NET news group or the SQL Server News Group.


Good luck with your project,

Otis Mukinfus

http://www.otismukinfus.com
http://www.arltex.com
http://www.tomchilders.com
http://www.n5ge.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top