08-17-2009 09:09 AM
You should be able to see which row/field is changed in an event-case (i think), thus you should be able to build your WHERE-clause that way instead of selecting.
I worked some on databases this spring and it was alot of hands-on needed to get things to work in a general manner (specific queries are easy though).
/Y
08-17-2009 09:37 AM
08-17-2009 09:45 AM
Peter_Y wrote:
but I woud like to just have a table where I could write a new value in the table, press enter or a update button or something and the value would automatically be updated to the database.
My point was that someone has to write the code for that to happen. In Visual Studio it works because Microsoft wrote the code.
If you don't mind treating the booleans and numerics as strings (in the GUI, I don't think it matters when you actually update) then you can expand your example to do this fairly easily - all you need to do is tell it which column(s) is\are the key and then compare each row to the value it had when you got it from the database. For each row which was changed, you build an UPDATE query. It's possible that you could improve the performance by rolling all of them into a single query, but you probably don't need that and I wouldn't know the syntax for something like this.