Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4006032
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:27:58+00:00 2026-05-20T08:27:58+00:00

I want that on a new installation of my .net winforms application, which uses

  • 0

I want that on a new installation of my .net winforms application,
which uses sql server 2005 express ,
it would drop old databases if exist but before deleting them ,
it alerts that the databases are empty or not by showing a message box i.e. they contain tables or not , & then creates new databases.

so whats the way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:27:58+00:00Added an answer on May 20, 2026 at 8:27 am

    You can run a SQL Statement similar to this

    select 1 as DBExists from master.sys.databases where name = 'YourDatabaseNameGoesHere'

    If the dataset has rows, then the database exists!

    You can find the number of tables in it (to see if it is empty or not) by running this SQL

    select COUNT (*) as NumTables from YourDatabaseNameGoesHere.INFORMATION_SCHEMA.TABLES

    If the dataset has rows, then display a messagebox with the appropriate message and then if the answer is “Yes” then drop the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know that does apple's Push Notification Server generate new device token
Name: <%= Html.TextBox(txtName, 20, new { @class = hello }) %> I want that
The new table has an auto-increment that I want to use for the data
I recently created a new header file that I want to include in the
Hello everyone I am new to blackberry and I want a textfield that scroll
hello i am little new to all this but i want to know that:
I have a script that create a new div element. Then, I want to
Totally new to Capistrano. I have a local git repository that I want to
Hi I'm new to regexes. I have a string that I want to match
so the problem is, that i want to insert a new row after another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.