Re: Creating a database



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



.



Relevant Pages

  • RE: Backups have Shadow Copy Problems
    ... and restarted the server. ... suggested and changed the recovery model to simple on the one database called ... I understand the issue to be: the backup task failed ... You back up data from a volume that contains a Microsoft SQL Server ...
    (microsoft.public.windows.server.sbs)
  • Re: upsizing to sql 2005
    ... the word SERVER in it, ... You can access to the database by multiple means (Access, ... and how does it update the SQL database with the new records in Access? ... Query Name: Arcadia - ARC ...
    (microsoft.public.access.queries)
  • Re: Linked Tables in Access
    ... any use of SQL Passthru, Linked Tables or any other use of MDB / MDE ... server, or would I also need to convert *those* queries to passthrough ... I've been trying to understand why Access database files become corrupt. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Trouble Getting VS.Net 2003 WalkThroughs MSDE Connection
    ... Config Tool of SQL Server? ... > link to download the PUBs database. ... >>> Setup and they directed me to install MSDE and they attached a ...
    (microsoft.public.sqlserver.msde)
  • Re: Leveling by ID vs. "Standard"
    ... of this trade called Project Management. ... a database for the "Project Tables," ... to write reports on data from the server database. ... product supporting queries created with SQL. ...
    (microsoft.public.project)