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
Maneesh A N
NA
179
108.6k
error occured
Sep 27 2013 8:25 AM
string StrQuery;
try
{
using (SqlConnection conn = new SqlConnection(ConnString))
{
using (SqlCommand comm = new SqlCommand())
{
comm.Connection = conn;
conn.Open();
for(int i=0; i< dataGridView1.Rows.Count;i++)
{
StrQuery= @"INSERT INTO tableName VALUES ("
+ dataGridView1.Rows[i].Cells["ColumnName"].Value +", "
+ dataGridView1.Rows[i].Cells["ColumnName"].Value +");";
comm.CommandText = StrQuery;
comm.ExecuteNonQuery();
}
}
}
i written the code like this.but i got error,use of un assigned local variable '
StrQuery
'
Reply
Answers (
5
)
Disable TeamViewer Type Programs when my application run
Learning MVC: Bundles