Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Stop Recordset to update (Urgent)

Posted on 2005-03-10
Medium Priority
Last Modified: 2013-11-26
hi i have got a record set formed by a join query and everytime i add a new row in it and run resync command it updates the values in the table but i dont want it to update the values in the table unless i actually perform an (Save Record method or update batch method)on it. Is there any possibility to do this because i have got a scenario where the user enter the values but then press the 'cancel' button or exit the application so it shouldn't save the values in the table.

if i set the .activeconnection property to nothing (rs.activeconnection=nothing) then it doesn't let me use the resync property so please tell mehow can i make this possible .....

please help!!!!!!!!!!!
Question by:parmoon
LVL 19

Accepted Solution

Shauli earned 375 total points
ID: 13505277
One way to do it is to work with unbound control, where you load the data from your table(s) to the control, but the control is not connected after you finished loading it.
Then is you need to add a new record, you can use INSERT INTO as in:

YourConnection.Execute "INSERT INTO tablename (fieldname1, fieldname2, fieldname3.... ) VALUES (value1, value2, value3....)"

For updateing an existing record you can use "UPDATE' as in:

YourConnection. Execute "UPDATE table name SET fieldname1 = vlaue1, fieldname2 = value2.... WHERE filednameID = valueID"


Author Comment

ID: 13506474
is there any other solution ???????

Assisted Solution

PePi earned 375 total points
ID: 13508317
try using BeginTrans and CommitTrans. you use this by setting it in your ADO Connection object

     add the new row
     do the resync

when you do your save record method go:


if the users hit Cancel then:


Hope this is what you are looking for.

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 13509157
Error: No transaction is active.....

Expert Comment

ID: 13511207
try stepping through your code. mark those that have BeginTrans, CommitTrans & RollbakTrans and see where this error is being thrown

Author Comment

ID: 13517382
when i try to committrans then it throws this error

"No transaction is active"

Expert Comment

ID: 13519310
did you issue the BeginTrans method prior to your adding of a new row & resynch? did you close the connection somewhere in between?

Expert Comment

ID: 13649105
what are you using to gather the data for the new row. is it another form or in a datagrid with the current query. i would suggest using a different form to gather the data then when the user clicks ok save and do the resync, else just exit the form.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question