TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
771k
object reference not set to an instance of object
Sep 19 2015 1:09 AM
Add button code as follows
Sql = "select cpm_pkg_id from CO_PACKAGE_MASTER where cpm_pkg_name = '" + txtpkgdesc.Text.ToString().Trim() + "' ";
dt1 = SCon.ReadSql_DT(Sql);
if(dt1.Rows.Count>0)
{
Sql ="Insert into CO_PACKAGE_DETAIL values('" + dt1.Rows[0]["cpm_pkg_id"].ToString() + "','" + gvmajormaster.selectedrow(1].tostring.trim() + "','" + gvmajormaster.selectedrows[2].tostring().trim() + "')";
SCon.ExecSql(Sql);
lblErr.Text = "Package details inserted successfully";
}
In gridview as follows
Select Major Code Minor Code
PSTF AFF
i want to insert the above gridview row values PSTF (Major code) and AFF(Minor Code) into co_package detail.
i tried the below code but shows error as follows
Object reference not set to an instance of an object.
Reply
Answers (
1
)
how to Unable to cast COM object of type 'System.__ComObject
Receiving data from COM3 port gives error?