adapter.InsertCommand = myConn.CreateCommand();
adapter.InsertCommand.CommandText =
"INSERT INTO Article " +
"(artId, title, topic, authorId, lines, dateOfPublishing) " +
"VALUES(@artId, @title, @topic, @authorId, @lines, @dateOfPublishing) ";
AddParams(adapter.InsertCommand, "artId", "title", "topic", "authorId", "lines", "dateOfPublishing");
I am using visual studio 2012. Anyone with helpful hint.
Thanks.
Iftikar HussainPosted Jul 9, 2013, 12:15 AM
You can try like this
Regards,
Iftikar
Jignesh TrivediPosted Jul 9, 2013, 12:04 AM
hi,
As per my knowledge there is no AddParams method in ADO.net
To add parameter you have to write your own code.
Please refer
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx
hope this will help you.
Riyaz AkhtarPosted Jul 8, 2013, 11:18 PM