ALPESH KOTHARI wrote:
> 
> Hello Everybody,

[snip]

> following exception:
> java.sql.SQLException: ERROR:  parser: parse error at
> or near ""
> 
[snip]

>                         try
>                         {
>                                         pid1=din.readInt();
>                                         System.out.println(pid1);
>                                         int len1=din.readByte();
>                                         byte[] lent=new byte[len1+2];
>                                         for(int i=0;i<=len1+1;i++)
>                                         {
>                                                 lent[i]=din.readByte();
>                                         }
>                                         test1=new String(lent);
>                                         System.out.println(test1);
>                                         ps.setInt(1,pid1);
>                                         ps.setString(2,test1);
>                                         try{
>                                                 int x=ps.executeUpdate();
>                                                 }
>                                         catch (SQLException ex){
>                                                 System.out.println("Exception="+ex);
>                                         }
> 

I would expect that you are needing single quotation marks around the
string built for the char() field in the database, so that the insert
would have 'foo' as a parameter rather than just foo.

You can also direct the question to the postgresql interfaces mailing
list, where Peter Mount is very helpful with problems regarding his
excellent JDBC driver.

Dallas Hockley
[EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to