How to log SQL-code run against MDB?

Hi Experts,

is it possible to log all SQL-statements executed against a certain MDB-file? Maybe something like the SQL Profiler for MS SQL Server?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sorry, but not to my knowledge.
The only way would be to run all queries from code and record that in a loggong table.
The queries are executed by the Je engine and this has no logging or view possibility.

Why do you need this ?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
broesiAuthor Commented:
It is the same old story: a programmer did a little tool that moves data around between several MDB-files. Now he left and all we have is this little executable (presumably created with Visual Basic). Of course the database structure changed and we have to re-create the little tool from scratch since we do not have the source code.

To make this task a little easier, I would like to see the SQL that is sent to the MDB's.

Them I'm afraid when he's dynamically creating the queries in code and that it will be impossible to get them.

Sorry for the bad news...

On the oher hand it's often faster to start from scratch to create an application as the time to find out how an old application works is considerable.

Sounds like you've got a pain on your hands, lad.
I agree with nico that you should start from scratch (then you can comment the code yourself too for future users)
Plus, its always better to try and avoid changing a running system
broesiAuthor Commented:
Found out myself:

1. Opened the MDB with Access 2000
2. Used the Upsizing wizard to move the tables to a Microsoft SQL-Server
3. Linked the tables back using their original names

Now I can use SQL Profiler to have a look under the hood...

Might not work with all applications, but for this one it does!

Thanks for your responses, I'll split the points...

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.