NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

ORACLE + DATAPROVIDER + DATE (HOW THIS SHIT WORKS?)

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
pscamara
Posted via mailing list.





PostPosted: Wed May 26, 2010 9:12 pm    Post subject: ORACLE + DATAPROVIDER + DATE (HOW THIS SHIT WORKS?) Reply with quote

I GOT SOME PROBLEMS WITH DATAPROVIDER. I CANT COMMIT BECAUSE THE DATE VALUES
(only) NEVER MATCH USING ORACLE DATABASE.

documentDataProvider.commitChanges();

I am trying to update some dates but when dataprovider execute "pre-update
SELECT" i got some errors.
The data provide executes the query with date parameter format completly
different. So the query never run. If i change the date value to string
value everyting works. How to handle oracle dates into dataprovider?

The data provider is trying to execute a query with this:
Paramm[5]=(java.sql.Date,2007-01-01)
Paramm[6]=(java.sql.Date,2007-12-31)

My database table:

periodo_1 as date (just date no time, eg 01-jan-2010 00:00:00)
periodo_2 as date


13:53:34,647 INFO [STDOUT] INSERT INTO DOCUMENTOS_ADM (COD_DOCUMENTO,
COD_ORIGEM, COD_SETOR, COD_TIPO, PERIODO_1, PERIODO_2, DESCRICAO, MODULO,
ESTANTE, PRATELEIRA, CAIXA, PRAZO_2, IND_PERMANENTE, INTERVALO_1,
INTERVALO_2, LIVROS, OUTROS, IND_ESPACO, COMENTARIOS) VALUES (?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

13:53:34,647 INFO [STDOUT] SELECT COD_DOCUMENTO, COD_ORIGEM, COD_SETOR,
COD_TIPO, PERIODO_1, PERIODO_2, DESCRICAO, MODULO, ESTANTE, PRATELEIRA,
CAIXA, PRAZO_2, IND_PERMANENTE, INTERVALO_1, INTERVALO_2, LIVROS, OUTROS,
IND_ESPACO, COMENTARIOS FROM DOCUMENTOS_ADM WHERE COD_DOCUMENTO = ? AND
COD_ORIGEM = ? AND COD_SETOR = ? AND COD_TIPO = ? AND PERIODO_1 = ? AND
PERIODO_2 = ? AND DESCRICAO = ? AND MODULO = ? AND ESTANTE = ? AND
PRATELEIRA = ? AND CAIXA = ? AND PRAZO_2 IS NULL AND IND_PERMANENTE = ? AND
INTERVALO_1 = ? AND INTERVALO_2 = ? AND LIVROS IS NULL AND OUTROS IS NULL
AND IND_ESPACO IS NULL AND COMENTARIOS IS NULL

13:53:34,960 INFO [STDOUT] Paramm[1]=(java.lang.String,3021)
Paramm[2]=(java.lang.String,BA) Paramm[3]=(java.lang.String,S1)
Paramm[4]=(java.lang.String,000) Paramm[5]=(java.sql.Date,2007-01-01)
Paramm[6]=(java.sql.Date,2007-12-31) Paramm[7]=(java.lang.String,RELATÓRIOS
DE TESTES / CERTIFICADO CALIBRAÇÃO EQUIPAMENTOS MONITORAÇÃO (MSA, TECSONIC);
AVALIAÇÃO TREINAMENTO BÁSICO E NORMAS (SENAI))
Paramm[8]=(java.lang.String,13) Paramm[9]=(java.lang.String,01)
Paramm[10]=(java.lang.String,04) Paramm[11]=(java.lang.String,0027)
Paramm[12]=(null) Paramm[12]=(java.lang.String,1)
Paramm[13]=(java.lang.String,01-JAN-2007)
Paramm[14]=(java.lang.String,31-JAN-2007) Paramm[15]=(null)
Paramm[15]=(null) Paramm[15]=(null) Paramm[15]=(null)

13:53:35,460 INFO [STDOUT] Writer: executing pre-update SELECT

13:53:48,932 ERROR [[/ARQ]] Erro ao gravar registros:


I need some help
--
View this message in context: http://old.nabble.com/ORACLE-%2B-DATAPROVIDER-%2B-DATE-%28HOW-THIS-SHIT-WORKS-%29-tp28683660p28683660.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo