Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / October 2005



Tip: Looking for answers? Try searching our database.

Trace ADO calls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joao Paulo Faria - 13 Oct 2005 19:44 GMT
Is there a way to log to file the SQL statements on ADO
Recordset.Open/Connection.Execute calls?

Let me expose the scenario: I have an app running on several clients, and at
a specific one it's raising some errors, which I think are caused by a bad
SQL statement. I've already seen some localized versions o JET that have
boolean values translated as "Verdadero"/"Falso" on spanish (for True/False
values), and I bet this is the reason. If I could log the calls to a file,
it'd be easy to point where's the error.

The app is built using a lot of calls on ADODB.Recordset. Now I'm writting a
wrapper to Recordset to trace the .Open calls to a file, but I'm wondering
if the provider couldn't do this for me.

Thanks,

JP
Someone - 13 Oct 2005 20:13 GMT
Yes there is. In ODBC in Control Panel, there is Tracing tab. Set the file
name and click "Start Tracing Now". In the resultant file, search for
"Select", "Update", "Insert" to find your SQL statements.

> boolean values translated as "Verdadero"/"Falso" on spanish (for
> True/False
> values), and I bet this is the reason. If I could log the calls to a file,

There are also Date/Time formats, MM/DD/YYYY vs. DD/MM/YYYY. Today is the
13th and cannot be a month.

> Is there a way to log to file the SQL statements on ADO
> Recordset.Open/Connection.Execute calls?
[quoted text clipped - 16 lines]
>
> JP
Joao Paulo Faria - 13 Oct 2005 20:31 GMT
Hum, I'm using ADO+ Jet not ADO + ODBC. It doesn't seem to work on Jet.

By the way, I said localized versions of Jet translatge some crucial words
like TRUE/FALSE, and it's the VB runtime, not Jet.

I'm aware about date formats. Thanks anyway.

"Someone" <nobody@cox.net>
> Yes there is. In ODBC in Control Panel, there is Tracing tab. Set the file
> name and click "Start Tracing Now". In the resultant file, search for
[quoted text clipped - 28 lines]
> >
> > JP
William (Bill) Vaughn - 28 Oct 2005 20:14 GMT
Yes, in ADO.NET 2.0 you can enable TRACE for all providers.

Signature

____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

> Hum, I'm using ADO+ Jet not ADO + ODBC. It doesn't seem to work on Jet.
>
[quoted text clipped - 44 lines]
>> >
>> > JP
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.