PDA

View Full Version : Scrambled code?



ralph.burkey
2012-12-13, 08:16 PM
We have a VBA program written locally for managing our Autocad documents. It contains a subroutine to update the Title block in a drawing. This update includes the initials for the Drafter, Checker, and Engineer. A new drafter was just put into the database. His initials are EP. However, the update routine inserts it as 64. That's right, the numbers 6 and 4 instead of the letters E and P.

Everything else works fine. As far as I know, this glitch appeared when the drafter's name was first put into the database. I know this isn't much to go on, but I can't share more detail without getting a little too proprietary.

Any thoughts?

Anybody?

Bueller?

Anybody?

-Ralphie

BlackBox
2012-12-13, 08:32 PM
More information is necessary in order to offer informed (perhaps even helpful?) responses... Some questions that come to mind:

What sort of database?

Was the new drafter's information added to the correct fields within said database?

Is your VBA looking at the correct version of the database?

What could possibly be so proprietary about making VBA interface with any form of database that you couldn't share an anonymized code snippet... Did you use the .NET or ObjectARX APIs to expand that VBA API?

ralph.burkey
2012-12-13, 09:31 PM
Well, that's kind of the problem. I'm a Lisp progammer, not a VBA programmer. I not only don't know how the info is inserted into the SQL database we're using, I don't have permissions to access it. They just wanted me to look at the problem and see if I could come up with a solution. I'm at a standstill. Your questions are excellent, and I'll check them out, but I don't hold out much hope of making a difference.


Thanks anyway.

-Ralphie

BlackBox
2012-12-13, 10:18 PM
Well, that's kind of the problem. I'm a Lisp progammer, not a VBA programmer. I not only don't know how the info is inserted into the SQL database we're using, I don't have permissions to access it. They just wanted me to look at the problem and see if I could come up with a solution. I'm at a standstill. Your questions are excellent, and I'll check them out, but I don't hold out much hope of making a difference.


Thanks anyway.

-Ralphie

No worries; ActiveX is ActiveX be it Visual LISP, or VBA for the most part... With VBA you just get a more robust IDE, and the dependencies that come with references, form work, etc.. I personally jumped from Visual LISP to .NET APIs, so I am no VBA expert by any stretch of the imagination.

As for your task... In order to effectively debug the issue, you'll need the appropriate level of access, even if only temporary. Understanding the syntax differential is going to be challenging enough, especially not know how to navigate the VBAIDE, but then not being able to 'see' what the code your navigating is even accessing is setting you up to fail (IMO).

Here's to hoping that you're not also having to make a WinXP 32-Bit app work on Win7 64-Bit... Cheers! :beer: