pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedError: Input string was not in a correct format
5+ messages / 3 participants
[nested] [flat]
* Error: Input string was not in a correct format
@ 2007-05-07 23:17 Rommel the iCeMAn <icecrew@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Rommel the iCeMAn @ 2007-05-07 23:17 UTC (permalink / raw)
To: pgsql-sql
Hi guys,
I'm trying to call a function from my .NET project and I am getting this
error: "Input string was not in a correct format". I have checked to make
sure that I am not mismatching my parameters. Is there a way that I can see
the actual SQL query that is being sent to postgresql? Once I can see this
then perhaps I can find the little gremlin that is annoying me :-)
Thanks,
Rommel Edwards
Software Developer,
Barbados, Caribbean.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error: Input string was not in a correct format
@ 2007-05-07 23:37 Rommel the iCeMAn <icecrew@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Rommel the iCeMAn @ 2007-05-07 23:37 UTC (permalink / raw)
To: pgsql-sql
Ok guys,
Sorry for the false alarm. I solved the problem. When I define my parameters
in .NET in the order they are listed in pgAdmin, the function call works. If
I use the order that they are listed in Visual Studio's Server Explorer, the
function call fails. It appears Visual Studio's Server explorer is listing
my function parameters incorrectly.
Thanks anyways.
Rommel Edwards
Software Developer,
Barbados, Caribbean.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error: Input string was not in a correct format
@ 2007-05-07 23:46 Michael Glaesemann <grzm@seespotcode.net>
parent: Rommel the iCeMAn <icecrew@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Michael Glaesemann @ 2007-05-07 23:46 UTC (permalink / raw)
To: Rommel the iCeMAn <icecrew@gmail.com>; +Cc: pgsql-sql
On May 7, 2007, at 18:17 , Rommel the iCeMAn wrote:
> Is there a way that I can see
> the actual SQL query that is being sent to postgresql?
From within PostgreSQL you can put the SQL queries in the logs.
http://www.postgresql.org/docs/8.2/interactive/runtime-config-
logging.html#RUNTIME-CONFIG-LOGGING-WHAT
Check out the log_statement paramenter (and possibly others).
You might also have some logging options within .NET, but as I'm
unfamiliar with the framework, I really can't help you there.
Michael Glaesemann
grzm seespotcode net
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error: Input string was not in a correct format
@ 2007-05-08 00:11 Tom Lane <tgl@sss.pgh.pa.us>
parent: Rommel the iCeMAn <icecrew@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2007-05-08 00:11 UTC (permalink / raw)
To: Rommel the iCeMAn <icecrew@gmail.com>; +Cc: pgsql-sql
"Rommel the iCeMAn" <icecrew@gmail.com> writes:
> I'm trying to call a function from my .NET project and I am getting this
> error: "Input string was not in a correct format". I have checked to make
> sure that I am not mismatching my parameters. Is there a way that I can see
> the actual SQL query that is being sent to postgresql? Once I can see this
> then perhaps I can find the little gremlin that is annoying me :-)
FWIW, I can't find that error string (or even one using the phrase
"correct format") anywhere in the core PG code. So it's coming from
somewhere on the client side, unless you've got some third-party library
loaded into the backend.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error: Input string was not in a correct format
@ 2007-05-08 14:10 Rommel the iCeMAn <icecrew@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Rommel the iCeMAn @ 2007-05-08 14:10 UTC (permalink / raw)
To: pgsql-sql
Hi Michael & Tom,
First of all, thanks to Michael for your response. I did enable logging of
SQL queries but still I could find no SQL statements in the logs. This led
me to believe it was a client-side error. Then I saw the response from Tom
which confirmed what I was thinking, so my second set of thank-you's goes
out to Tom.
I declared a function as follows: test_func(integer, character varying,
integer, character varying). I used Visual Studio's Server Explorer to view
the function and it showed up as test_func(integer, integer, character
varying, character varying). The problem is that Server Explorer groups
parameters together according to data type. If you follow the function
declaration according to Server Explorer, you will end up with mismatched
parameters. If you follow the function declaration according to pgAdmin,
your code will work. From now on, at least until the problem in .NET is
fixed, I will be using pgAdmin to view my functions instead of Visual
Studio's Server Explorer.
FYI, I am using CoreLab's PostgreSQL.NET drivers, I've reported the issue to
them as well. At the time I didn't know if it was an issue with the .NET
drivers or with PostgreSQL so I reported my findings to this forum as well
as theirs.
Ok then, that's a mouthful, thanks again guys for the help.
Rommel Edwards,
Barbados, (sunny) Caribbean.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2007-05-08 14:10 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-07 23:17 Error: Input string was not in a correct format Rommel the iCeMAn <icecrew@gmail.com>
2007-05-07 23:46 ` Michael Glaesemann <grzm@seespotcode.net>
2007-05-08 00:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-05-08 14:10 ` Rommel the iCeMAn <icecrew@gmail.com>
2007-05-07 23:37 Re: Error: Input string was not in a correct format Rommel the iCeMAn <icecrew@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox