Postgres ReStore quiestion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Postgres ReStore quiestion

pdigonzelli
Hi all , I have problems updating a Date instance variable in ReStore -
dialect Postgres.

'UPDATE convenio_laboral SET fecha_fin = {d''2005-01-20''}, version_ = 3
WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'

give an ODBC conversion error.

Can anyone help me?

TIA
Pablo

PD: In Acces all works OK.


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

pdigonzelli
By the way , the error was
'An error occured during commit: ''S1000: ODBC escape convert error'''

Pablo

"Pablo Digonzelli" <[hidden email]> escribió en el mensaje
news:[hidden email]...

> Hi all , I have problems updating a Date instance variable in ReStore -
> dialect Postgres.
>
> 'UPDATE convenio_laboral SET fecha_fin = {d''2005-01-20''}, version_ = 3
> WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'
>
> give an ODBC conversion error.
>
> Can anyone help me?
>
> TIA
> Pablo
>
> PD: In Acces all works OK.
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

Chris Uppal-3
In reply to this post by pdigonzelli
Pablo Digonzelli wrote:

> Hi all , I have problems updating a Date instance variable in ReStore -
> dialect Postgres.
>
> 'UPDATE convenio_laboral SET fecha_fin = {d''2005-01-20''}, version_ = 3
> WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'
>
> give an ODBC conversion error.

I don't think that:

    {d'2005-01-20'}

is legal in Postgres.  (I'm not sure but I don't remember it being legal SQL
either, is it an Access- (or MS)-specific extension ?).  Anyway it looks as if
using just:

    'UPDATE convenio_laboral SET fecha_fin = ''2005-01-20'', version_ = 3
    WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'

should work, though you may want to force how the date string is parsed (and,
sorry, but I don't know how to do that).

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

Henrik H. Jensen
Chris Uppal wrote:
> I don't think that:
>
>    {d'2005-01-20'}
>
> is legal in Postgres.

Hmm the {d "yyyy-mm-dd"} syntax is the ODBC database neutral syntax - it is
the drivers responsibility to translate it into something the server
understands

--
----
Henrik H. Jensen, CDM A/S
Strandvejen 863, 2930 Klampenborg, Denmark
Homepage: http://www.cdm.dk
Phone: +45 7027 1927, Fax: +45 7027 1928


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

pdigonzelli
Yes , that's the question.
In apparience , the official postgres driver does not understand this.
Someone knows another driver who works?

TIA
Pablo
"Henrik H. Jensen" <hjATcdmDOTdk> escribió en el mensaje
news:[hidden email]...
> Chris Uppal wrote:
> > I don't think that:
> >
> >    {d'2005-01-20'}
> >
> > is legal in Postgres.
>
> Hmm the {d "yyyy-mm-dd"} syntax is the ODBC database neutral syntax - it
is

> the drivers responsibility to translate it into something the server
> understands
>
> --
> ----
> Henrik H. Jensen, CDM A/S
> Strandvejen 863, 2930 Klampenborg, Denmark
> Homepage: http://www.cdm.dk
> Phone: +45 7027 1927, Fax: +45 7027 1928
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

Chris Uppal-3
In reply to this post by Henrik H. Jensen
Henrik H. Jensen wrote:

> Chris Uppal wrote:
> > I don't think that:
> >
> >    {d'2005-01-20'}
> >
> > is legal in Postgres.
>
> Hmm the {d "yyyy-mm-dd"} syntax is the ODBC database neutral syntax - it
> is the drivers responsibility to translate it into something the server
> understands

Ah!  Thank you for the correction; I hadn't even /heard/ of these escape
clauses before!

Now that I have, it looks as if the Postgres ODBC driver expects a space
between the 'd' and the date string. Try:

    'UPDATE convenio_laboral SET fecha_fin = {d ''2005-01-20''}, version_ = 3
    WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'

which works for me using the 07.03.02.00 driver.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

pdigonzelli
Chris
I have the same driver and it does not work for me...
Any idea?

TIA
PAblo

"Chris Uppal" <[hidden email]> escribió en el
mensaje news:[hidden email]...

> Henrik H. Jensen wrote:
> > Chris Uppal wrote:
> > > I don't think that:
> > >
> > >    {d'2005-01-20'}
> > >
> > > is legal in Postgres.
> >
> > Hmm the {d "yyyy-mm-dd"} syntax is the ODBC database neutral syntax - it
> > is the drivers responsibility to translate it into something the server
> > understands
>
> Ah!  Thank you for the correction; I hadn't even /heard/ of these escape
> clauses before!
>
> Now that I have, it looks as if the Postgres ODBC driver expects a space
> between the 'd' and the date string. Try:
>
>     'UPDATE convenio_laboral SET fecha_fin = {d ''2005-01-20''}, version_
= 3
>     WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'
>
> which works for me using the 07.03.02.00 driver.
>
>     -- chris
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

pdigonzelli
Sorry Chris , with a space it effectly works ok.
Tahnks a lot
Pablo

"Pablo Digonzelli" <[hidden email]> escribió en el mensaje
news:[hidden email]...

> Chris
> I have the same driver and it does not work for me...
> Any idea?
>
> TIA
> PAblo
>
> "Chris Uppal" <[hidden email]> escribió en el
> mensaje news:[hidden email]...
> > Henrik H. Jensen wrote:
> > > Chris Uppal wrote:
> > > > I don't think that:
> > > >
> > > >    {d'2005-01-20'}
> > > >
> > > > is legal in Postgres.
> > >
> > > Hmm the {d "yyyy-mm-dd"} syntax is the ODBC database neutral syntax -
it
> > > is the drivers responsibility to translate it into something the
server
> > > understands
> >
> > Ah!  Thank you for the correction; I hadn't even /heard/ of these escape
> > clauses before!
> >
> > Now that I have, it looks as if the Postgres ODBC driver expects a space
> > between the 'd' and the date string. Try:
> >
> >     'UPDATE convenio_laboral SET fecha_fin = {d ''2005-01-20''},
version_

> = 3
> >     WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ = 2)'
> >
> > which works for me using the 07.03.02.00 driver.
> >
> >     -- chris
> >
> >
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Postgres ReStore quiestion

pdigonzelli
For more information... it works OK in Access too

"Pablo Digonzelli" <[hidden email]> escribió en el mensaje
news:[hidden email]...

> Sorry Chris , with a space it effectly works ok.
> Tahnks a lot
> Pablo
>
> "Pablo Digonzelli" <[hidden email]> escribió en el mensaje
> news:[hidden email]...
> > Chris
> > I have the same driver and it does not work for me...
> > Any idea?
> >
> > TIA
> > PAblo
> >
> > "Chris Uppal" <[hidden email]> escribió en el
> > mensaje news:[hidden email]...
> > > Henrik H. Jensen wrote:
> > > > Chris Uppal wrote:
> > > > > I don't think that:
> > > > >
> > > > >    {d'2005-01-20'}
> > > > >
> > > > > is legal in Postgres.
> > > >
> > > > Hmm the {d "yyyy-mm-dd"} syntax is the ODBC database neutral
syntax -
> it
> > > > is the drivers responsibility to translate it into something the
> server
> > > > understands
> > >
> > > Ah!  Thank you for the correction; I hadn't even /heard/ of these
escape
> > > clauses before!
> > >
> > > Now that I have, it looks as if the Postgres ODBC driver expects a
space
> > > between the 'd' and the date string. Try:
> > >
> > >     'UPDATE convenio_laboral SET fecha_fin = {d ''2005-01-20''},
> version_
> > = 3
> > >     WHERE (convenio_laboral.id_ = 1 AND convenio_laboral.version_ =
2)'

> > >
> > > which works for me using the 07.03.02.00 driver.
> > >
> > >     -- chris
> > >
> > >
> > >
> >
> >
>
>