473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to create a MSDE Database

ad
How to create a MSDE Database with C#?
Nov 16 '05 #1
1 1159
Just connect to the Master database and execute a CREATE DATABASE statement.
Here's a working example but remember that the SQL and the C# code are both
in their most basic form. You should flush them both out before building it
into your application:

using(SqlConnection conn = new
SqlConnection("Server=localhost;Database=master;In tegrated Security=SSPI"))

{

// create the command

SqlCommand cmd = conn.CreateCommand();

cmd.CommandType = CommandType.Text;

cmd.CommandText = "CREATE DATABASE TestDB";

// create the database

conn.Open();

cmd.ExecuteNonQuery();

conn.Close();

}

HTH

DalePres

MCAD, MCDBA, MCSE

"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:up**************@TK2MSFTNGP15.phx.gbl...
How to create a MSDE Database with C#?

Nov 16 '05 #2

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

Similar topics

1
by: Mike N. | last post by:
I am writing a database app which will run under MSDE on the user's systems. Other than limitations as to the number of concurrent users, are there any issues that I need to be aware of when...
5
by: Robin Tucker | last post by:
I'm looking for a simple way of telling (inside a stored procedure) if I'm currently using MSDE or a full SQL server. Ideally, there is some pre-defined environment variable that won't cause me...
0
by: Alain \Mbuna\ | last post by:
Hi to all. After working a while with visual basic express 2005 and SQLserver 2005 express, mainly to learn the vb language and to take my first steps with ADO.net, I decided to buy Visual Basic...
2
by: Rosy Moss | last post by:
I am in the process of cleaning up a database that our company uses to track jobs, time and expense, and customer information. We are running Windows 2000 Server with approximately 20 terminals...
0
by: Lou Arnold | last post by:
Why isn't a database created on the MSDE?? Network: Two Win2K Pro machines connected as peers. (No domains.) MS Access is on X, MSDE2000A is on H. MS Access is run under: Windows...
0
by: Lou Arnold | last post by:
I can't create a database in MSDE with MS Access. Why? Some details: 1) Single computer - so there is no domain controller. 2) No firewalls. A fresh install of Win2K SP4, MSDE 2000A and MS...
1
by: Paul Aspinall | last post by:
Hi I have a C# Winform app which runs using SQL Server. I want to package up the app, so that it deploys with MSDE. Can anyone offer any pointers or references to help?? Thanks
12
by: Dan V. | last post by:
Since an ASP.NET/ADO.NET website is run on the server by a single "asp_net worker process", therefore doesn't that mean that even 50 simultaneous human users of the website would appear to the...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.