Click here to Skip to main content
15,916,601 members
Home / Discussions / C#
   

C#

 
QuestionOpening a file with VS2005(8.0) Pin
Ista9-Jun-06 11:15
Ista9-Jun-06 11:15 
QuestionDateTime.Now returning incorrect results (using Compact Framework) Pin
BlackDice9-Jun-06 11:10
BlackDice9-Jun-06 11:10 
Questionsql statement in c# Pin
ddpn429-Jun-06 10:51
ddpn429-Jun-06 10:51 
AnswerRe: sql statement in c# Pin
Colin Angus Mackay9-Jun-06 11:41
Colin Angus Mackay9-Jun-06 11:41 
GeneralRe: sql statement in c# Pin
ddpn429-Jun-06 11:59
ddpn429-Jun-06 11:59 
AnswerRe: sql statement in c# Pin
BoneSoft9-Jun-06 12:02
BoneSoft9-Jun-06 12:02 
GeneralRe: sql statement in c# Pin
ddpn429-Jun-06 12:19
ddpn429-Jun-06 12:19 
GeneralRe: sql statement in c# Pin
Colin Angus Mackay9-Jun-06 22:02
Colin Angus Mackay9-Jun-06 22:02 
BoneSoft wrote:
You can seperate statements with 'GO' (in MS SQL Server at least)


The GO is not actually part of T-SQL (the dialect of SQL used in SQL Server). It is a preprocessing symbol used by query analyser to split batches of SQL. Query Analyzer will strip out the GO symbols and send the chunks of SQL they deliniate to SQL Server individually. The variable declarations will not remain in context between GO symbols. The code example you have given will produce an error because after the GO the variable @two is no longer recognised. Also, I'm not sure what the @removed is for. Query Analyzer produces the following:
Server: Msg 137, Level 15, State 1, Line 3
Must declare the variable '@removed'.
Server: Msg 137, Level 15, State 1, Line 1
Must declare the variable '@two'.
I also had to delete the comment as the GO is the only thing permitted on the line on which it appears.


"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)

My: Website | Blog
GeneralRe: sql statement in c# Pin
BoneSoft10-Jun-06 5:20
BoneSoft10-Jun-06 5:20 
QuestionTreeView Node Click Pin
Richard Andrew x649-Jun-06 10:31
professionalRichard Andrew x649-Jun-06 10:31 
AnswerRe: TreeView Node Click Pin
BoneSoft9-Jun-06 10:57
BoneSoft9-Jun-06 10:57 
GeneralRe: TreeView Node Click Pin
Richard Andrew x649-Jun-06 11:07
professionalRichard Andrew x649-Jun-06 11:07 
GeneralRe: TreeView Node Click Pin
BoneSoft9-Jun-06 11:33
BoneSoft9-Jun-06 11:33 
QuestionDeleting rows in streams Pin
NaNg152419-Jun-06 9:28
NaNg152419-Jun-06 9:28 
AnswerRe: Deleting rows in streams Pin
Ed.Poore9-Jun-06 10:07
Ed.Poore9-Jun-06 10:07 
GeneralRe: Deleting rows in streams Pin
NaNg152419-Jun-06 10:26
NaNg152419-Jun-06 10:26 
GeneralRe: Deleting rows in streams Pin
Ed.Poore9-Jun-06 12:50
Ed.Poore9-Jun-06 12:50 
QuestionComboBox binding problem . Pin
microuser_20009-Jun-06 8:37
microuser_20009-Jun-06 8:37 
AnswerRe: ComboBox binding problem . Pin
Paul Brower9-Jun-06 9:12
Paul Brower9-Jun-06 9:12 
QuestionVisual C# and goto startup form Pin
Saamir9-Jun-06 7:47
Saamir9-Jun-06 7:47 
AnswerRe: Visual C# and goto startup form Pin
Alexander Wiseman9-Jun-06 7:58
Alexander Wiseman9-Jun-06 7:58 
GeneralRe: Visual C# and goto startup form Pin
Saamir10-Jun-06 4:49
Saamir10-Jun-06 4:49 
QuestionC# designer Pin
Brandon Frye9-Jun-06 7:08
Brandon Frye9-Jun-06 7:08 
AnswerRe: C# designer Pin
LongRange.Shooter9-Jun-06 7:22
LongRange.Shooter9-Jun-06 7:22 
GeneralRe: C# designer Pin
Brandon Frye9-Jun-06 7:38
Brandon Frye9-Jun-06 7:38 

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.