Possible Bug SybaseAsaDQE/Tracing

Posts   
 
    
Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 17-May-2013 11:07:04   

Hi,

If I implement the tracing functionality for SybaseAsaDQE into my app.config then the DQE generates a wrong SQL-Statement.

SybaseAse understands a questionmark for parameters but not for example @p1.

To reproduce that behaviour simply add the following lines to your config file:


<system.diagnostics>
    <switches>
        <add name="SybaseAsaDQE" value="4" />
        <add name="ORMGeneral" value="0" />
        <add name="ORMQueryExecution" value="0" />
        <add name="ORMStateManagement" value="0" />
        <add name="ORMPersistenceExecution" value="3" />
        <add name="LinqExpressionHandler" value="3" />
    </switches>
</system.diagnostics>


make changes to an existing entity and call the Save-Method. I am using "Self-Servicing" in that case.

Please see signature for Version Information at the bottom.

Kind regards Carlo

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 17-May-2013 14:32:08   

Tracing is emitting a string variant of the query to the trace output, it's never sent to the DB. So I'm a bit confused what you mean with the error: the tracer makes the query send to the DB fail but if tracing is switched off, it's not?

Frans Bouma | Lead developer LLBLGen Pro
Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 17-May-2013 18:08:21   

I know.

I also told my customer that tracing doesn´t affect the SQL Statement creation. If I remove the tracing from the config file everything works otherwise SELECT and INSERT works but UPDATE not because of the "@p1 ..." parameter names.

Regards Carlo

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-May-2013 09:18:21   

Hi Carlo,

As Frans said: tracing shows you the executed queries, formatted as you can understand them, the queries sent to DB are ready for DB to interpret them. Turning on/off tracing doesn't affect the queries sent to the DB. So maybe your customer is trying to execute the tracing queries directly on the DB ( ? )

David Elizondo | LLBLGen Support Team
Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 18-May-2013 16:57:00   

daelmo wrote:

Turning on/off tracing doesn't affect the queries sent to the DB.

Yes, you are right. But a simple single update dies because of a wrong formatted query. Please see attachement.

It works without the trace options.

So if it works without the trace it is not far away that somone thought it could be associated with the trace option.

Regards Carlo

Attachments
Filename File size Added on Approval
ActionQuery.png 58,903 18-May-2013 16:57.18 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 19-May-2013 12:19:54   

My german is very rusty but I think it says 'parameter not found', so it's specified in the query string, but not passed as a parameter in the command.

Do any updates fail, or just some? Which version of LLBLGen Pro is this, and is the latest build for that version used (if not, please download the latest build for that version and retry)

Also, screenshots of exceptions are not really useful. please give me the full exception and stacktrace (!).

IMHO this can't have anything to do with tracing as tracing emits the query AFTER it's been executed successfully. Also, tracing is done in generic code so all code should fail with tracing on, which isn't the case.

Frans Bouma | Lead developer LLBLGen Pro