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
Amy Turnbull
NA
40
0
C#.net store procedure not inserting data to sql database
Aug 9 2007 11:30 AM
Hello, I have run and excute and tested my sql procedures and they work, but in my code its not working and the values are correct, can you see if im missing anything pleae.
private void CheckOut_Click(object sender, System.EventArgs e)
{
string myConnectionString = (string) ConfigurationSettings.AppSettings["SqlConnection"];
// create connection
SqlConnection cnn = new SqlConnection(myConnectionString);
// create command SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "BugTrackerInsertCheckedOut";
// add parameters
cmd.Parameters.Add(new SqlParameter("@bg_id", SqlDbType.Int)); cmd.Parameters["@bg_id"].Value = id;
cmd.Parameters.Add(new SqlParameter("@us_id", SqlDbType.Int)); cmd.Parameters["@us_id"].Value = security.this_usid;
// execute and close cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close(); }
Reply
Answers (
14
)
Web Browser Control - using InternetOpen session
.Net Menu disappearing after opening.