Re: Creating a database
- From: "Robert Porter" <robertporter@xxxxxxxxxxxxxxx>
- Date: Sat, 23 Sep 2006 01:28:50 +0000
Whoa, I don't mean to be obnoxious so please don't take it that way, but Williams analogy with the knife is correct. It is far easier to learn something properly than blunder around and have to unlearn a lot. These newsgroups are a great resource for answering all manner of questions, but not for teaching the entire theory of relational databases AND a complex environment like .NET.
Please do yourself a favor, find a local user group, or buy a beginning book on SQL Server or take a class, you will save yourself a great deal of pain in the long run.
We will be here to help once you get a base understanding.
Cheers,
Bob Porter
"Adrian" <00@xxxxx> wrote in message news:45138b7c$0$739$5fc3050@xxxxxxxxxxxxxxxxxxxxxxxx:
I have a text on Stored Procedures.
My questions were the following
(1.) The code below does not have "CREATE PROCEDURE" in it, as my text
on SP
tells me Stored Procedures should have.
Question: "Is the code below a Stored Procedure after all?" Yes / No.
The code:
USE master
GO
CREATE DATABASE Products
ON
( NAME = prods_dat,
FILENAME = 'c:\program files\microsoft sql
server\mssql\data\prods.mdf',
SIZE = 4,
MAXSIZE = 10,
FILEGROWTH = 1 )
GO
Answer "No"
(2.) The code has been taken from MDSN and is Transact SQL. If it isn't
a SP
then I should be able to stick the code into a CommandText string and do
an
ExecuteNocQuery. However if I want to create a database, that database
is
not going to be there in the first place, so what do I put in the
connect
string, since the connect string has to specify a database name?
Answer "Yes"
Question A.
Stored Proceduers seem to need "CREATE STORED PROCEDURE".
Question: how do I get the code to comply to the stored procedure
cyntax?
Question B.
I can create a stored procedure from within the Server Explorer and from
SQL
Server Manager Studio Express. From within VS I have to follow this
route
according to a text I have: File -> New Project -> C# ->Database -> SQL
Server Project. I do not have these options in my VS Standard Edition.
Is it
still possible to create a SP in my VS Standard Edition without these
options (not using the two methods I have already stated, viz: from
within
the Server Explorer and from SQL Server Manager Studio Express)?
--
Cheers,
Robert Porter
.
- Prev by Date: How t
- Next by Date: DataColumn.DataSetDateTime Property - What is it good for?
- Previous by thread: Re: Creating a database
- Next by thread: ArrayList and FilterRow
- Index(es):
Relevant Pages
|