Using Dot Net variable I am Selecting record from External SQL table (Separate DB), To read a data I used SQLREADER. Once I read the data from SQL I want to update the Boolean field true which is available in External table. How to Achieve " Update Query " Using Data Adapter, and how to initialize data adapter using CAL code.
*This post is locked for comments
here is a link with example in cal.
hi
to update the value you do not need the sqldatareader.
you need sqlconnection and sqlcommand.
in c# the code it's like that:
using (SqlConnection connection = new SqlConnection(
connectionString))
{
SqlCommand command = new SqlCommand(queryString, connection);
command.Connection.Open();
command.ExecuteNonQuery();
}
queryString is a string/text variable, e.g. queryString = "update table1 set boolVar=true where id=@id";
not a big thing to adopt it to c/al.
you'll find tons of infos and tutorials about that topic.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156