473,395 Members | 1,622 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,395 software developers and data experts.

Creating SQL Database Programmatically

I can create a database by executing sql commands from files and create the
database and tables ok, but after I have closed the connection, I cannoy access
the database with anything - VS, SQL Server Management Studio etc without
rebooting the computer. It says it 'is in use by another program.

Is there some step that I am missing out on ?
May 28 '06 #1
4 1847
A SQL server database?
"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
I can create a database by executing sql commands from files and create the
database and tables ok, but after I have closed the connection, I cannoy
access the database with anything - VS, SQL Server Management Studio etc
without rebooting the computer. It says it 'is in use by another program.

Is there some step that I am missing out on ?

May 28 '06 #2
SQL Server Express

Greg Young wrote:
A SQL server database?
"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
I can create a database by executing sql commands from files and create the
database and tables ok, but after I have closed the connection, I cannoy
access the database with anything - VS, SQL Server Management Studio etc
without rebooting the computer. It says it 'is in use by another program.

Is there some step that I am missing out on ?


May 29 '06 #3
Perhaps it's something to do with the 'user instance' property of the connection
string ?

Not that I really know the ramifications of this.

Greg Young wrote:
A SQL server database?
"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
I can create a database by executing sql commands from files and create the
database and tables ok, but after I have closed the connection, I cannoy
access the database with anything - VS, SQL Server Management Studio etc
without rebooting the computer. It says it 'is in use by another program.

Is there some step that I am missing out on ?


May 29 '06 #4
hmm, it seems that the entire server was shutdown since only a reboot
helps where the sql services start by system startup.
Are you refering to "closed the connection" by YourConnection.Close()?

May 29 '06 #5

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

Similar topics

3
by: Jon Smyth | last post by:
I am trying to create a database programmatically using vb5 with the DAO 3.6 object. I'm using the following segment, but I'm not having any luck. I can't seen to find much help either. Any...
3
by: konsu | last post by:
hello, i would like to write a batch file with all sql commands necessary to create a database, its tables, and populate them with initial data. would the experts please help me with these...
0
by: DCount17 | last post by:
Help! Can anyone show me how to programmatically create database roles on Analysis Services? I'm using .NET C# but using a web page application. I was able to create members for an existing role...
8
by: Brian S. Smith | last post by:
Hi gang, Please help. I've been through the Access help, searched the Web, and I can't seem to get a straight answer. As the Subject line suggests, I want to run a fairly simple VB/Access Sub...
6
by: Null Reference | last post by:
Anybody here who can explain or point me to a link ? I wish to create a blank MS Access DB file programmatically using C# . Thanks, nfs
1
by: Arpan | last post by:
The following ASPX code snippet creates a DataSet programmatically right from the scratch: 'create an empty DataSet Dim objDS As New DataSet("MyDataSet") 'create a new table & add columns Dim...
5
by: Peter Schoots | last post by:
I am an amateur programmer and trying to move from VB6 to VB.net. I can't figure out how to create a ADO.NET database in code. I know how to create a dataset and wonder whether there is a way to...
3
by: johnb41 | last post by:
Can anyone help me? I need to create a SQL Server Express 2005 database programmatically in my app. I have searched the web and I found nothing. Can anyone help? Are there classes in the new...
5
by: Brian McClellan | last post by:
Just wondering if anyone has a simple example of creating a gridview completely programmatically, i'm not doing anything terribly sophisticated. When creating the gridview declaratively evertying...
3
by: paulquinlan100 | last post by:
Hi Im trying to programmatically create a query so that it can be exported to excel using docmd.outputto. I can do this easily enough with a saved query, but as the user has a variety of options...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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...

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.