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
G F
NA
44
6.7k
String Construction - Create Table with Parameter
Jul 1 2020 8:32 PM
Hi,
I'm trying to create a table where a column value is variable.
I've tried this, but does not work:
string
insertQuery =
"CREATE table bbb.temptable AS SELECT null Id, TDId, TerritoryName FROM bbb.traveldocumentsterritories WHERE TDId=@TDId"
;
MySql.Data.MySqlClient.MySqlCommand myCommand =
new
MySql.Data.MySqlClient.MySqlCommand(insertQuery, connection);
check.Parameters.AddWithValue(
"@TDId"
, oldTDnumber);
myCommand.ExecuteNonQuery();
TDID is the column name, and I want to pass the value with the variable OldTDnumber.
Any help would be appreciated!
Reply
Answers (
1
)
Bar code instead text in column c#
Previous problem....