Skip site navigation (1) Skip section navigation (2)

Res: Question on NpgsqlParameter object

From: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
To: Oliveiros Cristina <oliveiros(dot)cristina(at)gmail(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: Res: Question on NpgsqlParameter object
Date: 2007-05-28 22:32:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

Hi Oliveiros!

Unfortunately it is not possible with current state to get this text.

You will have to enable either Npgsql Log or postgresql log.

Just add those lines:

// Enable logging.
    NpgsqlEventLog.Level = LogLevel.Debug;
    NpgsqlEventLog.LogName = "NpgsqlTests.LogFile";
It will show you all the commands sent to server.

You can also get support from Npgsql mail list and forum. Check out Npgsql project page:

I hope it helps.

Francisco Figueiredo Jr.
Npgsql Lead Developer
MonoBrasil Project Founder Member
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

----- Mensagem original ----
De: Oliveiros Cristina <oliveiros(dot)cristina(at)gmail(dot)com>
Para: pgsql-interfaces(at)postgresql(dot)org
Enviadas: Segunda-feira, 28 de Maio de 2007 14:36:52
Assunto: [INTERFACES] Question on NpgsqlParameter object

Hi, List.

I am not 100% sure if this is the right list, if it isnt please kindly re-direct me to the proper list.

I would like to see NpgsqlCommand.CommandText value after parameter substitution. I have a query that is not behaving correctly and I suspect strongly that  it has to do with parameters getting instantiated in unexpected ways.

How can I have access to query SQL text after parameter substitution ?

I try to look at CommandText Property immediately before calling ExecuteReader() method, but I get the text with all parameters unsubstituted.

Any Help/Comments/Advices deeply appreciated

Thanks in advance


Fale com seus amigos  de gra├ža com o novo Yahoo! Messenger 


pgsql-interfaces by date

Next:From: Michael FuhrDate: 2007-05-28 22:39:11
Subject: Re: PQgetvalue failed to get non-text data under binary format
Previous:From: Oliveiros CristinaDate: 2007-05-28 17:36:52
Subject: Question on NpgsqlParameter object

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group