Click here to Skip to main content
15,905,614 members
Home / Discussions / Database
   

Database

 
AnswerRe: Query Problem? Pin
chinnasrihari11-May-06 3:49
chinnasrihari11-May-06 3:49 
QuestionSQL server 2000 Some friend help me Pin
AnhTin9-May-06 19:02
AnhTin9-May-06 19:02 
AnswerRe: SQL server 2000 Some friend help me Pin
Colin Angus Mackay9-May-06 21:38
Colin Angus Mackay9-May-06 21:38 
QuestionCan anyone answer my Query? Pin
Deepasubramanian9-May-06 17:29
Deepasubramanian9-May-06 17:29 
AnswerRe: Can anyone answer my Query? Pin
Chinchu Raj S9-May-06 21:40
Chinchu Raj S9-May-06 21:40 
AnswerRe: Can anyone answer my Query? Pin
Colin Angus Mackay9-May-06 22:02
Colin Angus Mackay9-May-06 22:02 
QuestionSQL Server 2000, uniqueidentifier (guid) PK columns, and ADO.NET 2.0 Pin
Jon Rista9-May-06 16:42
Jon Rista9-May-06 16:42 
AnswerRe: SQL Server 2000, uniqueidentifier (guid) PK columns, and ADO.NET 2.0 Pin
Jon Rista10-May-06 8:08
Jon Rista10-May-06 8:08 
Well, for anyone who runs into the same problem, the solution is simple, if odd. Seems you can't directly pass a Guid to a stored proc using an ADO.NET parameter. To get the stored procedure to work, I had to do the following:

cmd.Parameters.Add("@param", SqlDbType.VarChar, 40);
cmd.Parameters["@param"].Value = myGuid.ToString("D");

This sends the guid as a string value in the form {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. You must be sure to explicityly set the varchar length to 40, as setting it to 38 (which I did when I originally tried this, since I thought the bounding { and } would be invalid) will still cause the call to fail.

You can keep the type of the parameter in your stored procedure as uniqueidentifier. You do not have to change it to varchar, and in fact, if you do, the stored procedure will fail since varchar(40) won't match the uniqueidentifier type of the column.
QuestionNeed advice for Parent Child insert in transaction mode Pin
sandi antono9-May-06 4:28
sandi antono9-May-06 4:28 
AnswerRe: Need advice for Parent Child insert in transaction mode Pin
Paddy Boyd9-May-06 5:01
Paddy Boyd9-May-06 5:01 
GeneralThank's Pin
sandi antono9-May-06 5:27
sandi antono9-May-06 5:27 
QuestionMicrosoft sql server 2005 licensing query Pin
Fu Manchu9-May-06 3:20
Fu Manchu9-May-06 3:20 
AnswerRe: Microsoft sql server 2005 licensing query Pin
Michael Potter9-May-06 3:55
Michael Potter9-May-06 3:55 
GeneralRe: Microsoft sql server 2005 licensing query Pin
Fu Manchu9-May-06 4:22
Fu Manchu9-May-06 4:22 
GeneralRe: Microsoft sql server 2005 licensing query Pin
Michael Potter9-May-06 5:01
Michael Potter9-May-06 5:01 
Questionjoins Pin
PuccPukka9-May-06 0:51
PuccPukka9-May-06 0:51 
AnswerRe: joins Pin
albCode9-May-06 2:34
albCode9-May-06 2:34 
GeneralRe: joins Pin
PuccPukka9-May-06 3:29
PuccPukka9-May-06 3:29 
GeneralRe: joins Pin
albCode9-May-06 3:44
albCode9-May-06 3:44 
QuestionQuery String Pin
cshivaprasad8-May-06 21:30
cshivaprasad8-May-06 21:30 
AnswerRe: Query String Pin
Colin Angus Mackay8-May-06 22:37
Colin Angus Mackay8-May-06 22:37 
QuestionMultiple user inserting table at same time Pin
MaheshSharma8-May-06 20:11
MaheshSharma8-May-06 20:11 
AnswerRe: Multiple user inserting table at same time Pin
Eric Dahlvang9-May-06 3:16
Eric Dahlvang9-May-06 3:16 
Questionhow to get name of the day in SQL2000 Pin
isroavi8-May-06 17:24
isroavi8-May-06 17:24 
AnswerRe: how to get name of the day in SQL2000 Pin
isroavi8-May-06 17:33
isroavi8-May-06 17:33 

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.