Click here to Skip to main content
15,909,742 members
Home / Discussions / Database
   

Database

 
GeneralRe: ADO + SQL statements Pin
Ryan Roberts23-Aug-04 4:44
Ryan Roberts23-Aug-04 4:44 
GeneralRe: ADO + SQL statements Pin
J. Vorstenbosch25-Aug-04 0:40
J. Vorstenbosch25-Aug-04 0:40 
GeneralAuto date colum Pin
Zee_Zee21-Aug-04 1:55
Zee_Zee21-Aug-04 1:55 
GeneralRe: Auto date colum Pin
David Salter22-Aug-04 11:43
David Salter22-Aug-04 11:43 
GeneralSQL database problem Pin
Chodici Mrkev20-Aug-04 4:04
Chodici Mrkev20-Aug-04 4:04 
GeneralRe: SQL database problem Pin
Colin Angus Mackay20-Aug-04 4:49
Colin Angus Mackay20-Aug-04 4:49 
GeneralRe: SQL database problem Pin
Chodici Mrkev20-Aug-04 6:09
Chodici Mrkev20-Aug-04 6:09 
GeneralRe: SQL database problem Pin
Colin Angus Mackay20-Aug-04 6:26
Colin Angus Mackay20-Aug-04 6:26 
For the first problem it looks like I missed the line:
cmd.CommandType = CommandType.StoredProcedure
You need to place this between creating the cmd object and the cmd.ExecuteNonQuery.




chodicimrkev wrote:
It said an error when I had written in RAISEERROR '+@UserName+' instead of CurrentUser, don't you know why?

Ah! Just realised that RAISERROR doesn't like strings being concatenated inside it. Weird!?!

Anyway, try
DECLARE @error_message varchar(256); 
SET @error_message='The user '+@UserName+' already exists.'; 
RAISERROR(@error_message, 16, 1);


Hopefully it should work out now.


"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!


GeneralRe: SQL database problem Pin
Chodici Mrkev20-Aug-04 7:33
Chodici Mrkev20-Aug-04 7:33 
GeneralRe: SQL database problem Pin
Colin Angus Mackay20-Aug-04 7:54
Colin Angus Mackay20-Aug-04 7:54 
GeneralRe: SQL database problem Pin
Steven Campbell20-Aug-04 7:42
Steven Campbell20-Aug-04 7:42 
GeneralRe: SQL database problem Pin
Colin Angus Mackay20-Aug-04 7:55
Colin Angus Mackay20-Aug-04 7:55 
GeneralRe: SQL database problem Pin
Christian Graus22-Aug-04 15:30
protectorChristian Graus22-Aug-04 15:30 
GeneralRe: SQL database problem Pin
Colin Angus Mackay23-Aug-04 4:12
Colin Angus Mackay23-Aug-04 4:12 
GeneralEnterprise level database access in C#/.net Pin
Salil Khedkar19-Aug-04 21:36
Salil Khedkar19-Aug-04 21:36 
GeneralRe: Enterprise level database access in C#/.net Pin
Christian Graus22-Aug-04 15:27
protectorChristian Graus22-Aug-04 15:27 
GeneralDisplaying a DataGrid in child Form Pin
abhishk2001@yahoo.com19-Aug-04 13:01
abhishk2001@yahoo.com19-Aug-04 13:01 
GeneralAssembly resource not found Pin
unosinu19-Aug-04 6:00
unosinu19-Aug-04 6:00 
GeneralRe: Assembly resource not found Pin
Mekong River21-Aug-04 4:57
Mekong River21-Aug-04 4:57 
GeneralSQL query with parameter and % Pin
YomYom19-Aug-04 4:58
YomYom19-Aug-04 4:58 
GeneralRe: SQL query with parameter and % Pin
Chris Meech19-Aug-04 8:29
Chris Meech19-Aug-04 8:29 
GeneralRe: SQL query with parameter and % Pin
YomYom19-Aug-04 10:23
YomYom19-Aug-04 10:23 
GeneralRe: SQL query with parameter and % Pin
Looney Tunezez19-Aug-04 11:10
Looney Tunezez19-Aug-04 11:10 
QuestionHow to store and retrieve metadata about a database table column? Pin
Salil Khedkar19-Aug-04 2:48
Salil Khedkar19-Aug-04 2:48 
AnswerRe: How to store and retrieve metadata about a database table column? Pin
Colin Angus Mackay19-Aug-04 4:09
Colin Angus Mackay19-Aug-04 4:09 

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.