You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by "luis ......" <lu...@hotmail.com> on 2007/09/06 16:06:49 UTC

(Unknown)

Hello,I need to send a variable type Date from Java to PHP with XML-RPC.Isend the Date on this way:Date a = new Date(2007,9,5);params.addElement(a);client.execute(funcion,params);but when I send the Date, I have this error in the http sniffer:<br /><b>Warning</b>: pg_exec(): Query failed: ERROR: invalid input syntaxfor type date: &quot;--20070905T00:00:00&quot; in<b>/var/www/html/dev/sonia/casas_rurales/html/web/datos/conexion.class.php</b> on line <b>109</b><br />SQL: SELECT distinct(alojamiento_id) as alojamiento_id,fecha_entrada,fecha_salida,numero_habitacion,nombre_zona,city,province,idtypelodging FROMv_habitacion_alojamiento_disponibilidad WHERE province ~* '8' andidtypelodging = '8' and alojamiento_id in (SELECT alojamiento_idFROM v_suma_capacidad_alojamiento WHERE suma_maxima_capacidad ='8' )and numero_habitacion = '8' and alojamiento_id not in (selectalojamiento_id from v_habitacion_alojamiento_disponibilidad where ('--20070905T00:00:00' between fecha_entrada and fecha_salida) or ('--20070905T00:00:00' between fecha_entrada and fecha_salida))Error: ERROR: invalid input syntax for type date: "--20070905T00:00:00"<br>¿How must I send a Date in Java with XML-RPC?¿Must I declare theDate of another form?Thanks a lot.
_________________________________________________________________
Llama a tus amigos de PC a PC: ¡Es GRATIS!
http://get.live.com/messenger/overview

Re:

Posted by Jochen Wiedmann <jo...@gmail.com>.
IMO, your problem is completely unrelated to XML-RPC. When you send
the date, a certain format is used, according to the XML-RPC
specification. The date is received on the server and, so it seems,
used in an SQL query. But, of course, the SQL query expects a
completely different format. It's your task to convert the date on the
server in a proper format before using it in an SQL query.

Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

    -- (Terry Pratchett, Thief of Time)

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org