Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

It appears that ODBC Trace may not work if you use ADO.NET database drivers from SA 11. I am establishing a connection with the ODBC DSN "dsn=Calibration Data;uid=user;pwd=pass". Is it supposed to work?

If not, I suppose the recommended way to get Database Tracing Data is to use the Application Profiling mode of Sybase Central, correct? Is this possible for only a single client machine?

asked 24 Sep '10, 19:31

Cameron%20Taggart's gravatar image

Cameron Taggart
1076610
accept rate: 0%

edited 27 Sep '10, 08:09

Volker%20Barth's gravatar image

Volker Barth
40.2k362550822


Volker is right, the SA ADO.NET driver is not built on top of the ODBC driver. The ADO.NET driver is a native driver. When you connect using a Datasource or DSN, the ADO.NET driver reads the connection information from the registry, but does not invoke the ODBC driver at all.

(Aside: this is a common area of confusion for our users and we need to do a better job of explaining that ODBC datasources are a good choice for storing connection information, but their use by ESQL, ADO.NET or OLE DB does not require the use of ODBC. Our samples make heavy use of ODBC datasources leading some people to think it is a requirement, when it is definitely not.)

I would recommend against using the generic ODBC.NET driver. This driver is a bridge and adds an extra level to everything. As well, we have found the generic driver to be sort of buggy. Our native driver (iAnywhere.Data.SQLAnywhere) works much better and faster.

permanent link

answered 29 Sep '10, 15:42

Bill%20Hillis's gravatar image

Bill Hillis
83637
accept rate: 66%

Good point - I agree that this ODBC/DSN confusion should be explained better.

(30 Sep '10, 07:31) Volker Barth

Note: Treat this more or less as some wild guess - I'm no expert at all neither in ADO.Net nor in profiling...

AFAIK the SQL Anywhere ADO.Net Driver is a native driver, i.e. it does not sit on top of ODBC (or OLEDB). Therefore it won't leave any ODBC traces. - The fact that you can use an ODBC DSN in the connect string is just a matter of convenience, i.e. the driver knows how to handle these ODBC entries to collect the necessary connection information.

I do not know what exaclty you want to achieve, but besides application profiling, you might try to use the generic ODBC .Net driver (System.Data.Odbc) together with the SQL Anywhere ODBC driver. That combination should leave messages in the ODBC trace log. However, this might change your application's behaviour compared to the SQL Anywhere native driver and as such, it might not help to find out what you're really looking for.

permanent link

answered 27 Sep '10, 08:09

Volker%20Barth's gravatar image

Volker Barth
40.2k362550822
accept rate: 34%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×145

question asked: 24 Sep '10, 19:31

question was seen: 3,439 times

last updated: 29 Sep '10, 15:42