Hi all,
Maybe You will find a solution - how to save (insert into statement) multiple textboxes in one column in SQL table?
Well, what I have is a winform with 20 textboxes (each is for one metric). Table is build like:
Team | GSDate | GSGroup | GSMetric | GSValue | LoggedBy
what I would like to achieve, using one buton event to save all my textboxes:
it's a sample, but for GSMetric I would like to add all values from textboxes, and for GSValue as well, because those are changing in relation to remaining values (Team, GSDate, GSGroup, LoggedBy)
I'm using parameters.AddWithValue.
Thank you in advance!
Maybe You will find a solution - how to save (insert into statement) multiple textboxes in one column in SQL table?
Well, what I have is a winform with 20 textboxes (each is for one metric). Table is build like:
Team | GSDate | GSGroup | GSMetric | GSValue | LoggedBy
what I would like to achieve, using one buton event to save all my textboxes:
VB.NET:
Team | GSDate | GSGroup | GSMetric | GSValue | LoggedBy
FR 08/21/2013 CRC Calls 100% User1
FR 08/21/2013 CRC Emails 98.7% User1
FR 08/21/2013 CRC Handled 12 User1
it's a sample, but for GSMetric I would like to add all values from textboxes, and for GSValue as well, because those are changing in relation to remaining values (Team, GSDate, GSGroup, LoggedBy)
I'm using parameters.AddWithValue.
VB.NET:
Sql = "INSERT INTO tbl_Metrics (Team, GSDate, GSGroup, GSMetric, GSValue, LoggedBy) VALUES (@Team, @date, @group, @metric, @value, @user)" Using comm As New SqlCommand()
With comm
.Connection = cn
.CommandType = CommandType.Text
.CommandText = Sql
.Parameters.AddWithValue("@Team", gslog.cbGSTeam.SelectedItem)
.Parameters.AddWithValue("@date", MetDate.SelectedDate)
.Parameters.AddWithValue("@group", me3.Text)
.Parameters.AddWithValue("@metric", meH3.Text)
.Parameters.AddWithValue("@value", m1.Text.ToString)
Thank you in advance!