Click here to Skip to main content
15,906,766 members
Home / Discussions / Database
   

Database

 
GeneralRe: Question about Select Statement Pin
Mazdak2-Dec-02 20:22
Mazdak2-Dec-02 20:22 
GeneralDataSet question Pin
Paul Silvernail1-Dec-02 6:19
Paul Silvernail1-Dec-02 6:19 
GeneralRe: DataSet question Pin
Mazdak1-Dec-02 7:53
Mazdak1-Dec-02 7:53 
GeneralRe: DataSet question Pin
Paul Silvernail1-Dec-02 9:17
Paul Silvernail1-Dec-02 9:17 
GeneralAnother Access Memo Question Pin
Paul Silvernail29-Nov-02 13:48
Paul Silvernail29-Nov-02 13:48 
GeneralRe: Another Access Memo Question Pin
Not Active29-Nov-02 16:03
mentorNot Active29-Nov-02 16:03 
GeneralRe: Another Access Memo Question Pin
Paul Silvernail29-Nov-02 17:05
Paul Silvernail29-Nov-02 17:05 
QuestionHow do I run create scripts over the web? Pin
leppie29-Nov-02 9:36
leppie29-Nov-02 9:36 
Hi

I let SQL create me a create script for some stored procedures that has changed. The problme is how do I run this. I thought dropping this as CommandText for a SqlCommand would be OK, but this is not the case. Lotsa errors with GO statement. This what I get from SQL:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SelectUser]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SelectUser]
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO


CREATE PROCEDURE dbo.SelectUser
	@id bigint
AS
	SET NOCOUNT ON;
SELECT     ID, Username, Password, Email, Name, Sex, HomeTel, Language, WorkTel, CellTel, Address, City, Province, IDNr, PostalCode, JoinDate, Views, 
                      HomeShow, WorkShow, CellShow
FROM         Users
WHERE     (ID = @id)

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


I have pasted this code in query analyser and it runs flawlessly. What am I doing wrong?

Cheers Smile | :)


DBHelper - SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
AnswerSorted, kind of.... Pin
leppie29-Nov-02 12:14
leppie29-Nov-02 12:14 
GeneralRe: Sorted, kind of.... Pin
Not Active29-Nov-02 12:39
mentorNot Active29-Nov-02 12:39 
GeneralRe: Sorted, kind of.... Pin
leppie29-Nov-02 13:03
leppie29-Nov-02 13:03 
GeneralRe: Sorted, kind of.... Pin
Not Active29-Nov-02 14:54
mentorNot Active29-Nov-02 14:54 
GeneralRe: Sorted, kind of.... Pin
leppie30-Nov-02 4:41
leppie30-Nov-02 4:41 
GeneralRe: Sorted, kind of.... Pin
Not Active30-Nov-02 7:31
mentorNot Active30-Nov-02 7:31 
GeneralRe: Sorted, kind of.... Pin
leppie30-Nov-02 13:34
leppie30-Nov-02 13:34 
GeneralRe: Sorted, kind of.... Pin
Not Active30-Nov-02 19:50
mentorNot Active30-Nov-02 19:50 
General@RETURN_VALUE Pin
leppie29-Nov-02 8:04
leppie29-Nov-02 8:04 
GeneralRe: @RETURN_VALUE Pin
Jamie Nordmeyer29-Nov-02 9:18
Jamie Nordmeyer29-Nov-02 9:18 
GeneralRe: @RETURN_VALUE Pin
leppie29-Nov-02 9:40
leppie29-Nov-02 9:40 
GeneralRe: @RETURN_VALUE Pin
Not Active29-Nov-02 12:34
mentorNot Active29-Nov-02 12:34 
GeneralRe: @RETURN_VALUE Pin
leppie29-Nov-02 12:56
leppie29-Nov-02 12:56 
GeneralRe: @RETURN_VALUE Pin
Not Active29-Nov-02 14:49
mentorNot Active29-Nov-02 14:49 
GeneralRe: @RETURN_VALUE Pin
leppie29-Nov-02 23:21
leppie29-Nov-02 23:21 
GeneralAccessing a compiled Access dB Pin
Paul Watson29-Nov-02 2:33
sitebuilderPaul Watson29-Nov-02 2:33 
GeneralRe: Accessing a compiled Access dB Pin
Nick Parker4-Dec-02 9:13
protectorNick Parker4-Dec-02 9:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.