469,282 Members | 1,681 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Combining multiple SQL Update commands for Access database?

Hi! Perhaps you know of a better way here.

I have an Access database, actually a single table. Now, at the click of a button on a C# Form, each and every single cell associated with the primary keys has to be updated. I have the new cell values in an arraylist and this is what I am doing:

for (int i = 0; i < numberOfPrimaryKeys; i++)
adapter.UpdateCommand = new OleDbCommand(strSQL, conn);

"strSQL" has the update command for a row; I am updating the Access database one row-command at a time.

My God, ONE ROW-COMMAND AT A TIME! Is there a better way, a faster way?

I read somewhere that I can combine multiple SQL statements by separating them with a semi-colon and putting the whole lot into the "strSQL" string. Apparently, that doesn't work, at least not with an Access database.

Any and every comment will help. Thanks!

Posted by a user from .NET 247 (http://www.dotnet247.com/)

Jul 21 '05 #1
0 1060

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by jack daniels via .NET 247 | last post: by
3 posts views Thread by TClancey | last post: by
13 posts views Thread by =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post: by
13 posts views Thread by Terry Olsen | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.