Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

JDBC Update Problem?

3 posts in JConnect version 3.0 Last posting was on 1999-03-30 21:19:16.0Z
Mike Prinsen Posted on 1999-03-30 20:51:32.0Z
Message-ID: <37013954.7ED60345@prinsenet.com>
Date: Tue, 30 Mar 1999 13:51:32 -0700
From: Mike Prinsen <mike@prinsenet.com>
Organization: PRINSENET LLC
X-Mailer: Mozilla 4.51 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: JDBC Update Problem?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 34
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:279
Article PK: 255691

Hello,

I'm using PowerJ 2.5 / JDK 116 / Jconnect 3.0 on Win98.
Sybase ASE 11.0.3 is on Linux 2.0.36 (Kernel Rebuild).

I want to run a test to update a table. The connection
works fine and I can run 'Selects' w/o any problem. When
I try to update it gets ugly. I get the following message while
logged in on a teminal emulation session (to Linux box) while
running Isql. The code is below..

"00:1999/03/30 11:47:57.00 kernel Cannot
read, host proccess disconnected: spid: 7"

Thanks - any help would be greatly appreciated.

/******************
import java.io.*;
import java.sql.*;
import com.sybase.jdbc.*;
import java.util.*;

public void cb_1_actionPerformed( java.awt.event.ActionEvent event )
{
// Just to see if things are working
cb_1.setLabel( "Hello" );
Statement stmt2 = transaction_1.createStatement();
try {
stmt2.setCursorName("update_cursor");
}
catch (SQLException ef) {}

String val1 = new String("row999");


try {
stmt2.executeUpdate("update test set col1 = '" + val1 +
"'");
}
catch (SQLException ef)
{
System.out.println("Hosed");
//System.exit(1);
}
//System.exit(0);
}


Lance Andersen Posted on 1999-03-30 19:04:00.0Z
Message-ID: <37012020.868E709A@sybase.com>
Date: Tue, 30 Mar 1999 14:04:00 -0500
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: JDBC Update Problem?
References: <37013954.7ED60345@prinsenet.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 52
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:278
Article PK: 254592

Try the same via isql.

Also omit the setCursorName() if you are not using a cursor.

Lastly, please move up to jConnect 4.1 as there is basically no support
for jConnect 3.0 anylonger

Lance
team Sybase

Mike Prinsen wrote:
>
> Hello,
>
> I'm using PowerJ 2.5 / JDK 116 / Jconnect 3.0 on Win98.
> Sybase ASE 11.0.3 is on Linux 2.0.36 (Kernel Rebuild).
>
> I want to run a test to update a table. The connection
> works fine and I can run 'Selects' w/o any problem. When
> I try to update it gets ugly. I get the following message while
> logged in on a teminal emulation session (to Linux box) while
> running Isql. The code is below..
>
> "00:1999/03/30 11:47:57.00 kernel Cannot
> read, host proccess disconnected: spid: 7"
>
> Thanks - any help would be greatly appreciated.
>
> /******************
> import java.io.*;
> import java.sql.*;
> import com.sybase.jdbc.*;
> import java.util.*;
>
> public void cb_1_actionPerformed( java.awt.event.ActionEvent event )
> {
> // Just to see if things are working
> cb_1.setLabel( "Hello" );
> Statement stmt2 = transaction_1.createStatement();
> try {
> stmt2.setCursorName("update_cursor");
> }
> catch (SQLException ef) {}
>
> String val1 = new String("row999");
>
> try {
> stmt2.executeUpdate("update test set col1 = '" + val1 +
> "'");
> }
> catch (SQLException ef)
> {
> System.out.println("Hosed");
> //System.exit(1);
> }
> //System.exit(0);
> }

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Mike Prinsen Posted on 1999-03-30 21:19:16.0Z
Message-ID: <37013FD4.10659E61@prinsenet.com>
Date: Tue, 30 Mar 1999 14:19:16 -0700
From: Mike Prinsen <mike@prinsenet.com>
Organization: PRINSENET LLC
X-Mailer: Mozilla 4.51 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Lance Andersen <lancea@sybase.com>
Subject: Re: JDBC Update Problem?
References: <37013954.7ED60345@prinsenet.com> <37012020.868E709A@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 59
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:277
Article PK: 255697

Worked fine when I took out the setCursorName - this was
left over from some previous attempts.

thanks

Lance Andersen wrote:

> Try the same via isql.
>
> Also omit the setCursorName() if you are not using a cursor.
>
> Lastly, please move up to jConnect 4.1 as there is basically no support
> for jConnect 3.0 anylonger
>
> Lance
> team Sybase
>
> Mike Prinsen wrote:
> >
> > Hello,
> >
> > I'm using PowerJ 2.5 / JDK 116 / Jconnect 3.0 on Win98.
> > Sybase ASE 11.0.3 is on Linux 2.0.36 (Kernel Rebuild).
> >
> > I want to run a test to update a table. The connection
> > works fine and I can run 'Selects' w/o any problem. When
> > I try to update it gets ugly. I get the following message while
> > logged in on a teminal emulation session (to Linux box) while
> > running Isql. The code is below..
> >
> > "00:1999/03/30 11:47:57.00 kernel Cannot
> > read, host proccess disconnected: spid: 7"
> >
> > Thanks - any help would be greatly appreciated.
> >
> > /******************
> > import java.io.*;
> > import java.sql.*;
> > import com.sybase.jdbc.*;
> > import java.util.*;
> >
> > public void cb_1_actionPerformed( java.awt.event.ActionEvent event )
> > {
> > // Just to see if things are working
> > cb_1.setLabel( "Hello" );
> > Statement stmt2 = transaction_1.createStatement();
> > try {
> > stmt2.setCursorName("update_cursor");
> > }
> > catch (SQLException ef) {}
> >
> > String val1 = new String("row999");
> >
> > try {
> > stmt2.executeUpdate("update test set col1 = '" + val1 +
> > "'");
> > }
> > catch (SQLException ef)
> > {
> > System.out.println("Hosed");
> > //System.exit(1);
> > }
> > //System.exit(0);
> > }
>
> --
> ===============================================================================
> Lance J. Andersen Email: lancea@sybase.com
> Sybase Product Support Engineering Phone:(781) 564-6336
> 77 South Bedford Street Fax: (781) 564-6148
> Burlington, MA 01803
>
> The Dark Knight Returns!!! Let's Go Penguins!!!
> ===============================================================================