P
Phil Williams
Hello all,
I have a SQL Insert statement like the following:
INSERT INTO tblQuestions
(SurveyID, Inactive, Description, Datatype, Question,
ParentQuestionID, QuestionOrderNum)
VALUES
(@SurveyID,@Inactive,@Description,@Datatype,@Question,@ParentQuestionID,@QuestionOrderNum)
SELECT @QuestionID = @@IDENTITY
My problem is that the parameters are sometimes NULL.
If I pass in "DataType" as NULL I get the following error
System.InvalidCastException was unhandled
Message="Conversion from type 'DBNull' to type 'Integer' is not valid."
Source="Microsoft.VisualBasic"
Does anyone else get these errors and how do you get around them??
Thanks in advance,
Phil
I have a SQL Insert statement like the following:
INSERT INTO tblQuestions
(SurveyID, Inactive, Description, Datatype, Question,
ParentQuestionID, QuestionOrderNum)
VALUES
(@SurveyID,@Inactive,@Description,@Datatype,@Question,@ParentQuestionID,@QuestionOrderNum)
SELECT @QuestionID = @@IDENTITY
My problem is that the parameters are sometimes NULL.
If I pass in "DataType" as NULL I get the following error
System.InvalidCastException was unhandled
Message="Conversion from type 'DBNull' to type 'Integer' is not valid."
Source="Microsoft.VisualBasic"
Does anyone else get these errors and how do you get around them??
Thanks in advance,
Phil