Unable to Debug Forms and most subroutines

G

Guest

After months (really) of fiddling, I found out how to get debugging to work - under Debug > Exceptions, make sure Unhandled Exceptions break the code into the debugger and allow Visual Basic in the Options dialog to edit files while debugging

Anyway, on to my problem...I'm creating our own manufacturing software, IC, MRP, AP, AR, you get the idea. I'm on such a tight schedule I didn't have time to learn ADO.NET, so I created an active-x control in VB 6 that exposes the DAO functions and properties. It works like this
Dim msDAO as eDAO10182004.eDA

msDAO = Me.DAO_ICMAIN.GetOc
msDAO.DatabasePath = Unified.Settings.DataPath & "\Inventory Control.mdb
msDAO.RecordsetSQL = "SELECT * FROM [tblItemsMaster] WHERE [Item Number] = '" & Me.cboItemNumber.Text & "'
msDAO.OpenConnectio

You would then access the data through the msDAO.Recordset property. However, when it comes to debugging...hehehehe
I cannot use breakpoints or debug any form that has an Active-X control on it, whether it is mine, or one of Microsoft's (The Windows Forms Controls are okay though). Instead, I sometimes get a error message, but most of the time the program just quits without warning. It makes it hell for me because I keep having to write message boxes to figure out where in my code I am. Try...Catch statements don't even work on any subroutine that references an Active-X control. I'm at my wit's end. It takes hours a day to track down one bug. Just one

I'm using VB .NET 2003

Can someone, perhaps someone from Microsoft help me?
 
J

jim

Hi Warren, my only recommendation to you would be to spend the time you are
currently spending trying to debug this and just learn ado.net. It would
probably save you a ton of time in the long run. It's not difficult to
pickup at all, especially if you have any database design experience.

just my two cents...

hope this helps,

jim

Warren Ayen said:
After months (really) of fiddling, I found out how to get debugging to
work - under Debug > Exceptions, make sure Unhandled Exceptions break the
code into the debugger and allow Visual Basic in the Options dialog to edit
files while debugging.
Anyway, on to my problem...I'm creating our own manufacturing software,
IC, MRP, AP, AR, you get the idea. I'm on such a tight schedule I didn't
have time to learn ADO.NET, so I created an active-x control in VB 6 that
exposes the DAO functions and properties. It works like this:
Dim msDAO as eDAO10182004.eDAO

msDAO = Me.DAO_ICMAIN.GetOcx
msDAO.DatabasePath = Unified.Settings.DataPath & "\Inventory Control.mdb"
msDAO.RecordsetSQL = "SELECT * FROM [tblItemsMaster] WHERE [Item Number] =
'" & Me.cboItemNumber.Text & "'"
msDAO.OpenConnection

You would then access the data through the msDAO.Recordset property.
However, when it comes to debugging...heheheheh
I cannot use breakpoints or debug any form that has an Active-X control on
it, whether it is mine, or one of Microsoft's (The Windows Forms Controls
are okay though). Instead, I sometimes get a error message, but most of the
time the program just quits without warning. It makes it hell for me because
I keep having to write message boxes to figure out where in my code I am.
Try...Catch statements don't even work on any subroutine that references an
Active-X control. I'm at my wit's end. It takes hours a day to track down
one bug. Just one.
 
G

Guest

I also never learned ADO.NET because I love being able to directly access the table and edit the data. I'm not creating data input forms, I'm creating software that masks the idea you are even touching a database. The user has no idea what they are doing. In fact, to do most of what I do, I have to open up a dozen recordsets at once and move data back and forth and calculate this and that. I've never designed a database that used built-in functions, I manually built the New, Edit, Save, Delete, Undo, Next, Previous buttons with code

During the time it took for this to post and for a reply, I finally figured out how to get DAO to work in .NET and now I can use breakpoints to figure out what is going wrong as well as error messages. Yay!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top