Click here to Skip to main content
15,891,777 members
Home / Discussions / Database
   

Database

 
QuestionHow to detect table lock Pin
Joe Smith IX25-May-08 23:59
Joe Smith IX25-May-08 23:59 
AnswerRe: How to detect table lock Pin
Mycroft Holmes26-May-08 12:31
professionalMycroft Holmes26-May-08 12:31 
AnswerRe: How to detect table lock Pin
Ashfield26-May-08 21:30
Ashfield26-May-08 21:30 
AnswerRe: How to detect table lock Pin
Rutvik Dave27-May-08 3:53
professionalRutvik Dave27-May-08 3:53 
Questionconnect database server from other computer in network Pin
peterjc25-May-08 22:58
peterjc25-May-08 22:58 
AnswerRe: connect database server from other computer in network Pin
Hesbon Ongira26-May-08 20:36
Hesbon Ongira26-May-08 20:36 
GeneralRe: connect database server from other computer in network Pin
peterjc27-May-08 15:43
peterjc27-May-08 15:43 
QuestionReconstruct Question about Stored Procedure[Message Deleted] [modified] Pin
Hakmeh Mohannad25-May-08 22:45
Hakmeh Mohannad25-May-08 22:45 
Just Reconstruct My Question

i have the following function
public static int AddParent(ParentEntity  objParentEntity)
{
    return ((int)(SqlHelper.ExecuteScalar(ConnectionString, DatabaseOwner + "CreateParent"
,objParentEntity.ParentName
)));
}


and this stored procedure

ALTER PROCEDURE [dbo].[CreateParent] <br />
(<br />
@ParentName nvarchar(MAX)<br />
)<br />
AS<br />
BEGIN<br />
insert into [dbo].[Parent]<br />
(<br />
[ParentName]<br />
)<br />
VALUES <br />
( <br />
@ParentName<br />
)<br />
RETURN SCOPE_IDENTITY();<br />
END

the SP work fine

the error is the follwoing

Object reference not set to an instance of an object.

i think it is when it is returning the value because when i used CONVERT.TOINT32 it retrun 0

the point from all of this is to create a recored and then take its generated ID to use it somewhere else

so can someone help me and tell me what i did wrong

modified on Monday, May 26, 2008 6:02 AM

AnswerRe: Stored Procedure Question Pin
Alsvha25-May-08 22:55
Alsvha25-May-08 22:55 
Question[Microsoft][ODBC SQL Server Driver]Syntax error or access violation Pin
www.Developerof.NET25-May-08 21:10
www.Developerof.NET25-May-08 21:10 
AnswerRe: [Microsoft][ODBC SQL Server Driver]Syntax error or access violation Pin
www.Developerof.NET26-May-08 1:52
www.Developerof.NET26-May-08 1:52 
QuestionTriggers, AFTER INSERT?? URGENT Pin
Karan_TN25-May-08 21:09
Karan_TN25-May-08 21:09 
QuestionSelecting DISTINCT and copying to new table? Pin
Karan_TN25-May-08 19:31
Karan_TN25-May-08 19:31 
AnswerRe: Selecting DISTINCT and copying to new table? Pin
Blue_Boy25-May-08 19:41
Blue_Boy25-May-08 19:41 
GeneralRe: Selecting DISTINCT and copying to new table? Pin
Karan_TN25-May-08 19:49
Karan_TN25-May-08 19:49 
GeneralRe: Selecting DISTINCT and copying to new table? Pin
Ashfield26-May-08 8:18
Ashfield26-May-08 8:18 
QuestionAssigning value to variable Pin
CodingYoshi25-May-08 8:40
CodingYoshi25-May-08 8:40 
AnswerRe: Assigning value to variable Pin
Colin Angus Mackay25-May-08 13:32
Colin Angus Mackay25-May-08 13:32 
GeneralRe: Assigning value to variable Pin
CodingYoshi26-May-08 8:33
CodingYoshi26-May-08 8:33 
GeneralRe: Assigning value to variable Pin
Colin Angus Mackay26-May-08 13:37
Colin Angus Mackay26-May-08 13:37 
AnswerRe: Assigning value to variable Pin
Laxmikant Lad25-May-08 19:17
Laxmikant Lad25-May-08 19:17 
GeneralRe: Assigning value to variable Pin
CodingYoshi26-May-08 8:32
CodingYoshi26-May-08 8:32 
QuestionInvalid descriptor index ?? Pin
Vaclav_25-May-08 7:27
Vaclav_25-May-08 7:27 
QuestionConversion of Data Access method of SQL Server 2005 to Data Access method of ADO.NET Pin
kashshay25-May-08 7:23
kashshay25-May-08 7:23 
AnswerRe: Conversion of Data Access method of SQL Server 2005 to Data Access method of ADO.NET Pin
Hesham Amin25-May-08 21:23
Hesham Amin25-May-08 21:23 

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.