?
Solved

DAO, Oracle, rst.Update - "VB6.exe has generated Errors"

Posted on 2003-03-14
13
Medium Priority
?
403 Views
Last Modified: 2010-05-01

I have a program that works with SQL Server and am converting it to work with Oracle.
While updating a recordset, my program totally crashes VB6!

I have a DAO recordset (Not my idea to use DAO),
Set .AddNew, and it some values, attempt .Update,
and I get "VB6.exe has generated errors and will be shut down by Windows"
I have error checking in the program but the problem is so severe that
VB6 IDE shuts down.

I am connecting to Oracle with a Trigger on the table, a sequence to
fill the primary key (called by the trigger).

Any ideas?
I just got one - I am going to disable constraints on my table in Oracle
and see what happens.

But I am still listening...

Bob
0
Comment
Question by:BobsExEx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
13 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 8136937
tt
0
 
LVL 34

Expert Comment

by:arbert
ID: 8137543
Don't use DAO against a backend database--just really defeats the purpose of using a server database in the first place.

Are you going through and ODBC connection?  How are you opening the connection?

Brett
0
 

Author Comment

by:BobsExEx
ID: 8137649
Every time I ask a question about DAO, I get the same thing. Don't use it.  I haven't used it in 3 years until I got to a new company where it is the standard.  I am working with an already written program.  I am an ADO man, myself.

Anyway, I may have isolated the problem.  When I turned my constraints off, it may have freed up just enough resources to process the error - out of stack space.  This program, as written, is a resource hog.  I am closing and setting to nothing all objects but to no avail.  I am going to change the the subroutine to use SQL Insert statements rather than adding to a DAO recordset and I will see how that goes.

In general, though, I am thinking that the "Out of Stackspace" is causing the VB6.exe error.  It is just that I am SO out of stackspace that an error can't even be handled.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Expert Comment

by:arbert
ID: 8138123
Ya, is there an event or function that is being recursively called?

Yep, stored procs are the way to go for the inserts...

Brett
0
 

Expert Comment

by:EricOKelly
ID: 8143720
Also make sure you have updated the machines MDAC. First thing I check when Oracle hits me with an error that SQL Server does not
0
 
LVL 34

Expert Comment

by:arbert
ID: 8143733
MDAC mainly affects ADO--not DAO.  However, depending on the operating system, you might be using different versions of DAO.  Xp ships with newer versions than the old windows.

Brett
0
 

Author Comment

by:BobsExEx
ID: 8151809

I agree with you about the idea of updating MDAC but the development environment is crashing which is a problem with VB itself, not the references it uses.
0
 
LVL 34

Expert Comment

by:arbert
ID: 8152032
That's not necessarily true--just cause VB crashes doesn't mean it's a problem with references.....
0
 

Author Comment

by:BobsExEx
ID: 8152312

I think that is what I said, let me read it again...

Yeah, my point is that it is NOT a problem with the references.
0
 

Expert Comment

by:EricOKelly
ID: 8152642
What OS are you compiling with? I have seen this using NT4. If so update to sp5.

also see if there are any other ideas on this thread:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20118044.html
0
 

Author Comment

by:BobsExEx
ID: 8152692

Just to try and close this out...

I believe that it was an "Out of Stackspace" error and VB had so little resources left that it could not handle the error.  I found the exact statement it was happening on - a DAO.Recordset .Update after an .AddNew following field modifications.  I ended up replacing the Recordset manipulation with SQL Insert statements that I am now executing and everything is working okay.

Thanks for all the help.

Bob
0
 

Expert Comment

by:modulo
ID: 8198497
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/Q_20561506.html

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.

modulo

Community Support Moderator
Experts Exchange
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 8221593
Saving this Q as a PAQ and refunding the points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

800 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