Re: [JDBC] Re: ? (question mark) characters
On Thu, 2001-08-30 at 18:41, Barry Lind wrote: Ricardo, Is your database compiled for multibyte support? And what character set is the database you are connecting to created with? (to get the database character set do a 'psql -l'). If the answer to the first question is no or the answer to the second question is 'SQL_ASCII', then only 7bit characters are supported. : Ok, I tried all the drivers currently available at http://jdbc.fastcrypt.com. They all seem to correct the problem with long (8k) SQL statements, but they're all broken considering Portuguese characters like áéíóú (aeiou with accent)... they are replaced by question marks (?)... any ideas? Should I try to compile my own drivers? How? BTW I am using JDK 1.3 from Sun (Solaris and Linux)... For portugese you should be using -E LATIN1 Cheers Tony Grant -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [JDBC] Dúvida
Alan, The language of this list is English. We have a hard time understanding Portuguese. If you don't understand English, but do understand Spanish I would like to suggest that you check out the following website for documentation in Spanish : http://users.servicios.retecal.es/rsantos/ Cheers, Gunnar * [EMAIL PROTECTED] wrote: | | Bom, eu estou com milhões de dúvidas, mas vamos por partes | Eu não sei como instalar o PostgreSQL | Eu baixei o arquivo ZIP postgresql-7.1.2.tar.zip | No site da Postgre, extraí o arquivo para uma pasta, mas não vejo | Nenhum executável para instalar ou já começar a editar algo em SQL | Como faço para instalar o PostGreSQL ... e depois onde editar os | Códigos em SQL??? | | Desculpem a minha ignorância, mas eu preciso de ajuda. | | Obrigado pela atenção. | | Alan. | | | ---(end of broadcast)--- | TIP 5: Have you checked our extensive FAQ? | | http://www.postgresql.org/users-lounge/docs/faq.html | -- Gunnar Rønning - [EMAIL PROTECTED] Senior Consultant, Polygnosis AS, http://www.polygnosis.com/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[JDBC] truncated InputStream returned with getAsciiInputStream()
Hi I've seen a couple of discussion about this subject, and I wonder if you could help me finding a workaround for my problem too. I work with big XML documents, around 12000 to 15000 characters. Since these documents were occasionnally causing me performance problems during store operations, I tried using java.util.zip package's deflate and inflate methods to compress my data. These method output byte arrays, and the bytes can have any arbitrary value. Including -1. So now, to store my data in the database, I use BLOB instead of TEXT. It works fine, my data is stored and retreived without any problem with method set and getAsciiStream()... until there is a byte with value -1 in my Stream. If the 43rd byte is -1, the stream has a length of 42. The problem is that I cannot really escape the character, since it's compressed data, and I can't just remove it assuming it's a null character, cause it's not. Somebody has a clue? Isabelle ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [JDBC] truncated InputStream returned with getAsciiInputStream()
On Thu, 30 Aug 2001 18:24:30 -0400, you wrote: So now, to store my data in the database, I use BLOB instead of TEXT. It works fine, my data is stored and retreived without any problem with method set and getAsciiStream()... until there is a byte with value -1 in my Stream. If the 43rd byte is -1, the stream has a length of 42. Can you post a small program that reproduces the problem? Regards, René Pijlman [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [JDBC] truncated InputStream returned with getAsciiInputStream()
Is there a reason you are not using getBinaryStream()? You can't read a binary file with and AsciiStream. thanks, --Barry Isabelle Therrien wrote: Hi I've seen a couple of discussion about this subject, and I wonder if you could help me finding a workaround for my problem too. I work with big XML documents, around 12000 to 15000 characters. Since these documents were occasionnally causing me performance problems during store operations, I tried using java.util.zip package's deflate and inflate methods to compress my data. These method output byte arrays, and the bytes can have any arbitrary value. Including -1. So now, to store my data in the database, I use BLOB instead of TEXT. It works fine, my data is stored and retreived without any problem with method set and getAsciiStream()... until there is a byte with value -1 in my Stream. If the 43rd byte is -1, the stream has a length of 42. The problem is that I cannot really escape the character, since it's compressed data, and I can't just remove it assuming it's a null character, cause it's not. Somebody has a clue? Isabelle ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [JDBC] Read transactions don't work on 7.0.x db's
Dave, The multiple statements in one call is there for performance reasons. Please don't remove it entirely since it works fine in 7.1 and 7.2. Instead your fix should be conditional based on server version: if (autoCommit) ExecSQL(end); else { ifMinumumServerVersion(7.1) { ExecSQL(begin; + getIsolationLevelSQL()); } else { ExecSQL(begin); ExecSQL(getIsolationLevelSQL()); } } thanks, --Barry Dave Cramer wrote: Here's a patch to fix the problem below Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Dave Cramer Sent: August 30, 2001 8:51 PM To: [EMAIL PROTECTED] Subject: [JDBC] Read transactions don't work on 7.0.x db's The following code fails on a 7.0 db, but works on a 7.1 db It works fine with the 7.0 jar, but not with the latest code I had a quick look and everything looks ok. I am going to keep looking but I thought I would throw this out and see if anyone knows what is going on Dave package test; import java.sql.*; /** * Title: * Description: * Copyright:Copyright (c) 2001 * Company: * @author * @version 1.0 */ public class TransactionSelect { public TransactionSelect() { } public static Connection getConnection( String url, String user, String password) { try { Class.forName(org.postgresql.Driver); return java.sql.DriverManager.getConnection(url,user,password); } catch(ClassNotFoundException ex) { ex.printStackTrace(System.out); } catch(SQLException ex) { ex.printStackTrace(System.out); } return null; } public static void main(String[] args) { try{ Connection con = getConnection(jdbc:postgresql://192.168.1.1/davec,davec,); if (con == null){ throw new RuntimeException(no Connection); } con.setAutoCommit(false); PreparedStatement pstmt = con.prepareStatement(select * from categories ); ResultSet rs = pstmt.executeQuery(); con.commit(); con.close(); }catch (SQLException ex){ ex.printStackTrace(System.out); } } } ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl Connection.patch Content-Type: application/octet-stream Content-Encoding: quoted-printable Part 1.3 Content-Type: text/plain Content-Encoding: binary ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
Re: [JDBC] Read transactions don't work on 7.0.x db's Disregard my other patch
The first one considered everything changed ? I also fixed the rollback method in this one, assuming it was broken the same way Dave Connection.patch ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]