?
Solved

RollBacking is not happening in some client systems

Posted on 2007-08-01
5
Medium Priority
?
152 Views
Last Modified: 2013-11-25
my server os is windows 2003 standarad edition and we installed the sql server 2000 in the os with service pack 4.
our application is developed in visual basic 6.0 and converted as a package and installed in the client system
the problem is when saving the data from the client system it stores the record partially for example i want to store the record in 4 tables from the client system but when saving it stores the record in 2 tables only it is not storeing the record in other two tables
we gave rollback statement in the application but some client system it is rollbacking properly and some client system it is not roll backing the records properly and wise wersa when deleting the records from the client system
i checked the coding thoroughly but in some cases it is not roll backing properly so i need the answer to solve this problem kindly send me the reply to this
0
Comment
Question by:rsomasundar
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 750 total points
ID: 19610582
Hi rSomasundar,

Can you make me clear whether you are inserting records line by line or you are using the "insert into " sql statement to insert records in the table.

Before that let me give you a sugessition.

Better you try to handle one boolean variable to check whether the updation is successful or not.

For example please go through the code given below.

private sub cmdsave_click()
Dim updateprocess as boolean
on error goto errhandler:
begin transaction
  updateprocess = true
 
   sql1 = "insert into tablename1 and fieldvalues"
  connection.execute sql1
  if updateprocess = true then updateprocess = true

   sql2 = "insert into tablename2 and fieldvalues"
   connection.execute sql2
   if updateprocess = true then updateprocess = true

   sql3 = "insert into tablename3 and fieldvalues"
   connection.execute sql3
   if updateprocess = true then updateprocess = true

   sql4 = "insert into tablename4 and fieldvalues"
   connection.execute sql4
   if updateprocess = true then updateprocess = true
   
    if updateprocess = false then
           rollback trans
   else
         commit trans
    end if
exit sub

errhandler:
updateprocess =false
on error resume next
0
 
LVL 2

Author Comment

by:rsomasundar
ID: 19644314
Hi shasunder
i am using the insert into sql statement to store the values in the table
 
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 19644849
Hi rsomasundar,

Then I hope that you can use the above mentioned ways to solve your issue

by
d.Shanmuga sundaram
0
 
LVL 2

Author Comment

by:rsomasundar
ID: 19653314
Hi Shanmuga sundaram
Thanks for your Reply
My application was installed around 40 systems and at the same time 10 or 15 clients using my application and now the database is crossing 5.5gb so that when they are opening the application it is opening very slowly and retrieving the result set from the query also taking some time so that clients telling that that application is very slow
i did the index tunning and other things but still it is very slow
is there any way to increase my application speed kindly reply me

by
soma sundar
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 19656317
Hi rsomasundar,

Try optimizing your queries in the program. And also confirm the cursor type which you use in your program.

by
D.Shanmuga sundaram
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

864 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