473,473 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Database Gets Corrupted

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

*** Sent via Developersdex http://www.developersdex.com ***
Feb 23 '07 #1
1 1615
On Fri, 23 Feb 2007 07:42:21 -0800, Rajesh Pershad <pe*************@yahoo.com>
wrote:
>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

*** Sent via Developersdex http://www.developersdex.com ***
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
Feb 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: L Mehl | last post by:
I tested a FE/BE application developed in A2000 on a A2002 machine and got this message when exiting the app. Clicking the only available button "OK", exits the application, as intended. The FE...
19
by: adirat | last post by:
I have read a lot on this subject on newsgroups and other access related websites on data corruption, but since we are still not able to isolate the problem – I am posting this detailed explanation...
3
by: Leinad Kong | last post by:
I'm using Access 2002, as front-end and back-end as well: 1) I faced database corrupted problems, when more than 1 user edit concurrently. I'm using All-records Locking, and open-exclusively as...
3
by: Ken Davis via AccessMonster.com | last post by:
I get this error message when trying to compact and repair my database: (Could not find field "Description"). When I clicked on Help, the error message number comes up as (Error 3799) It's the...
6
by: Helmut | last post by:
Hello, I am Helmut, my database has a Frontend of 15.4 MB which cause Acc2K to corruption: Limit is 12.5 MB. Service Pack 3. On three different PCs with 256, 512 and 1.000 MB RAM. All on W2K,...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
1
by: Jack Orenstein | last post by:
My company is developing a PostgreSQL 7.4 application. We don't want our customers to have to manage the database, so we're automating as much maintenance as possible. If the database ever becomes...
2
by: Ron St-Pierre | last post by:
We're developing a java app and are using postgres as the database. On our dev server I started the app, closed it, but the java process was still open so I killed it, which caused the above error....
302
by: Lee | last post by:
Hi Whenever I use the gets() function, the gnu c compiler gives a warning that it is dangerous to use gets(). Is this due to the possibility of array overflow? Is it correct that the program...
9
by: advance scout | last post by:
HELP! My database is suddenly corrupted. My computer was acting funny (very sluggish) and was shut down. Access had been already been closed down but computer was acting very slow , so perhaps it...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.