Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
I am inserting Data into sql server db and use ADODB Command to execute the sql query.
"command.Execute(out rowsAffected, ref missing, (int)ExecuteOptionEnum.adExecuteNoRecords)"
and add the the affected rows into recordset using this cmd :
"recordSet.Open(command, missing, CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockReadOnly)"
the command is executed without error even the data is added to recordset but the data is not actually inserted(commited) to database.
no issue with connection string.
please suggest for this
Posted 25-Feb-13 5:06am
Edited 25-Feb-13 9:06am
(no name)499.7K
Tharaka MTR at 25-Feb-13 10:24am
please provide the complete code sample
ali khanna at 27-Feb-13 9:40am
the code is like
<pre lang="c#">
object rowsAffected = null
object missing = Type.Missing;
command.ActiveConnection = "";
command.CommandText = "Insert into table query**";
command.CommandType = CommandTypeEnum.adCmdText;
command.Execute(out rowsAffected, ref missing, (int)ExecuteOptionEnum.adExecuteNoRecords)
Abhinav S at 25-Feb-13 10:38am
Your update query is working?
ali khanna at 27-Feb-13 9:26am
yes the insert query is executed well in database .. when go through code runs without error but no updation in Database

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web02 | 2.8.150129.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100