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
zsing
NA
3
0
Parametize ALTER TABLE ??? Help!
May 19 2009 5:39 AM
I want to modify a table's structure with a method.
Please help how to write this method!
I've tried:
public void tableExpand(string tableName, string colName)
{
...................
dataCommand.CommandText =
"ALTER TABLE @tableName" +
"ADD @colName real";
SqlParameter tableParam = new SqlParameter();
tableParam
.ParameterName = "@tableName";
tableParam
.Value = tableName;
SqlParameter colParam = new SqlParameter();
colParam
.ParameterName = "@colName";
colParam
.Value = colName;
dataCommand.Parameters.Add(tableParam);
dataCommand.Parameters.Add(colParam);
.....................
}
But this isn't the right way :(
Reply
Answers (
2
)
How to load an XML file in C#.Net (by ignoring ':' )
I am giving font style ="123" but it is taking "Microsoft sans serif". How can I change that to some other