Thread: passing array to database function
<p> Â hi everybody,<br /><br /> i want to pass Integer array to database function from java precompiled statement. <br /><br/> java gives java.sql.Array interface but i dont know which implementing class i have to use in postgre<br /><br />regards<br /> ptrashantha.k.p<br /><br /><br /><br /><br /><a href="http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3"><img border="0"hspace="0" src="http://adworks.rediff.com/cgi-bin/AdWorks/sigimpress.cgi/www.rediff.com/signature-home.htm/1963059423@Middle5?OAS_query=null&PARTNER=3" vspace="0"/></a>
padmanabha konkodi wrote: > Â hi everybody, > > i want to pass Integer array to database function from java > precompiled statement. > > java gives java.sql.Array interface but i dont know which > implementing class i have to use in postgre I don't really "do" java, but have you tried an array of integers for your PostgreSQL function? What happened? -- Richard Huxton Archonet Ltd
O Richard Huxton έγραψε στις Feb 7, 2006 : > padmanabha konkodi wrote: > > Β hi everybody, > > > > i want to pass Integer array to database function from java > > precompiled statement. > > > > java gives java.sql.Array interface but i dont know which > > implementing class i have to use in postgre > > I don't really "do" java, but have you tried an array of integers for > your PostgreSQL function? What happened? The correct list is -jdbc. Theoritically you would have to write your own implementation of java.sql.Array. Practically build a String with the contents you want e.g. '{1,2,3,4}' for a int[] array, and your done. > > -- -Achilleus