Thread: Problem inserting a row containing GUIDs

Problem inserting a row containing GUIDs

From
"Kevin Crenshaw"
Date:

I am currently receiving an error message each time I try to insert a row.  The row contains several GUID values, and when I try to do the insert I get an error like ‘Syntax error at or near ‘a45’.  I’ve tried to enclose the GUIDs in quotes but I still get the error. 

 

Any help would be appreciated.

 

Here is a little more info:

 

OS – Windows XP Pro SP2

Postgresql v8.0.3

Provider – NPGSQL

 

Pg_log entries –

 

2005-10-27 09:23:16 LOG:  unexpected EOF on client connection

2005-10-27 09:23:44 ERROR:  syntax error at or near "dd72" at character 440

2005-10-27 09:24:07 LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

     

2005-10-27 09:24:07 LOG:  unexpected EOF on client connection

2005-10-27 09:26:46 NOTICE:  drop cascades to function sp_get_stakeholders(text)

2005-10-27 09:27:10 ERROR:  syntax error at or near "fd93b5" at character 466

2005-10-27 09:28:21 LOG:  unexpected EOF on client connection

2005-10-27 09:51:01 ERROR:  syntax error at or near "b3" at character 43

2005-10-27 09:51:45 LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

     

2005-10-27 09:51:45 LOG:  unexpected EOF on client connection

2005-10-27 09:52:32 ERROR:  syntax error at or near "a5" at character 48

2005-10-27 09:52:56 LOG:  unexpected EOF on client connection

2005-10-27 09:53:40 ERROR:  syntax error at or near "b6" at character 126

2005-10-27 09:54:44 LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

     

2005-10-27 09:54:44 LOG:  unexpected EOF on client connection

2005-10-27 09:56:36 ERROR:  syntax error at or near "b6" at character 126

2005-10-27 09:57:11 LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

     

2005-10-27 09:57:11 LOG:  unexpected EOF on client connection

2005-10-27 09:58:37 ERROR:  syntax error at or near "b6" at character 126

2005-10-27 09:59:22 LOG:  unexpected EOF on client connection

2005-10-27 10:00:14 ERROR:  syntax error at or near "43" at character 75

2005-10-27 10:00:50 LOG:  unexpected EOF on client connection

2005-10-27 10:01:40 ERROR:  syntax error at or near "43" at character 75

2005-10-27 10:01:49 LOG:  unexpected EOF on client connection

2005-10-27 10:03:24 ERROR:  syntax error at or near "43" at character 75

2005-10-27 10:04:43 LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

     

2005-10-27 10:04:43 LOG:  unexpected EOF on client connection

2005-10-27 10:05:11 ERROR:  syntax error at or near "10" at character 216

2005-10-27 10:06:43 LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

     

2005-10-27 10:06:43 LOG:  unexpected EOF on client connection

2005-10-27 10:08:09 ERROR:  syntax error at or near "af13e9" at character 438

 

SAMPLE GUID:

40af13e9-71dd-4e41-8e8a-2d323066e7d9

 

Thanks again for you help,

 

Kevin

Re: Problem inserting a row containing GUIDs

From
John DeSoi
Date:
On Oct 27, 2005, at 10:29 AM, Kevin Crenshaw wrote:

> I am currently receiving an error message each time I try to insert
> a row.  The row contains several GUID values, and when I try to do
> the insert I get an error like ‘Syntax error at or near ‘a45’.
> I’ve tried to enclose the GUIDs in quotes but I still get the error.

Assuming your GUID is defined as varchar or text, are you quoting the
GUID with single quotes like a string?

If that is not the problem, show your table definition and insert/
update statement.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: Problem inserting a row containing GUIDs

From
Michael Fuhr
Date:
On Thu, Oct 27, 2005 at 10:29:51AM -0400, Kevin Crenshaw wrote:
> I am currently receiving an error message each time I try to insert a row.
> The row contains several GUID values, and when I try to do the insert I get
> an error like 'Syntax error at or near 'a45'.  I've tried to enclose the
> GUIDs in quotes but I still get the error.

What's the exact insert statement?  A simple but complete test case
might reveal the problem.  That is, all SQL statements that somebody
could execute in an empty database to create a table and perform an
insert that fails as you describe.

> OS - Windows XP Pro SP2
> Postgresql v8.0.3
> Provider - NPGSQL

What's your code look like?  Have you tried the same insert using
psql or some other client?

--
Michael Fuhr

Re: Problem inserting a row containing GUIDs

From
"Kevin Crenshaw"
Date:
Thanks to everyone for replying to my question.  I recently installed the
TreeList control from DevExpress and the only time that I have the problem
is when I try to update the database using values that are modified by the
TreeList control.  If I submit the updates without using the control, the
update succeeds as expected.  I am currently working with DevExpress to find
a solution since it looks like it's their software that is causing the
problem.

Has anyone else had a problem making inserts or updates to a database while
using a DevExpress TreeList control that uses a string value in the
ParentField and KeyField properties?

Thanks again for your help,


kevin crenshaw


-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Michael Fuhr
Sent: Thursday, October 27, 2005 2:46 PM
To: Kevin Crenshaw
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Problem inserting a row containing GUIDs

On Thu, Oct 27, 2005 at 10:29:51AM -0400, Kevin Crenshaw wrote:
> I am currently receiving an error message each time I try to insert a row.
> The row contains several GUID values, and when I try to do the insert I
get
> an error like 'Syntax error at or near 'a45'.  I've tried to enclose the
> GUIDs in quotes but I still get the error.

What's the exact insert statement?  A simple but complete test case
might reveal the problem.  That is, all SQL statements that somebody
could execute in an empty database to create a table and perform an
insert that fails as you describe.

> OS - Windows XP Pro SP2
> Postgresql v8.0.3
> Provider - NPGSQL

What's your code look like?  Have you tried the same insert using
psql or some other client?

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings