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.

Netscape

4 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-06-23 20:34:16.0Z
Jim Lynch Posted on 1997-06-19 19:02:59.0Z
Message-ID: <33A98263.41C6@zazu.mcit.com>
Date: Thu, 19 Jun 1997 13:02:59 -0600
From: Jim Lynch <jlynch@zazu.mcit.com>
Organization: MCI Communications
X-Mailer: Mozilla 3.0 (X11; I; AIX 1)
MIME-Version: 1.0
CC: jlynch@zazu.mcit.com
Subject: Netscape
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 12
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:658
Article PK: 252413

I developed an applet the can connect to different databases on
different hosts. I'm using jConnect and JDK 1.0.2. The applet works
great using appletviewer, but when I try to use it in Netscape I can't
get any results back from the db.

I'm not sure what exactly I'm doing wrong or if I don't have a correct
setup, but if you could give me a few ideas it would be greatly
appreciated.

Thanks much,
Jim
jlynch@zazu.mcit.com


Lance Andersen Posted on 1997-06-20 20:41:01.0Z
Message-ID: <33AAEADD.669B@sybase.com>
Date: Fri, 20 Jun 1997 16:41:01 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: Jim Lynch <jlynch@zazu.mcit.com>
Subject: Re: Netscape
References: <33A98263.41C6@zazu.mcit.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 29
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:655
Article PK: 252407

Jim,

What was the error that occured? If it works
within the appletviewer, it should work with
netscape.

If you could provide the error, source, versions of netscape
and jconnect that wold help

thanks

lance

Jim Lynch wrote:
>
> I developed an applet the can connect to different databases on
> different hosts. I'm using jConnect and JDK 1.0.2. The applet works
> great using appletviewer, but when I try to use it in Netscape I can't
> get any results back from the db.
>
> I'm not sure what exactly I'm doing wrong or if I don't have a correct
> setup, but if you could give me a few ideas it would be greatly
> appreciated.
>
> Thanks much,
> Jim
> jlynch@zazu.mcit.com

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

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


Jim Lynch Posted on 1997-06-23 19:18:16.0Z
Message-ID: <33AECBF8.41C6@zazu.mcit.com>
Date: Mon, 23 Jun 1997 13:18:16 -0600
From: Jim Lynch <jlynch@zazu.mcit.com>
Organization: MCI Communications
X-Mailer: Mozilla 3.0 (X11; I; AIX 1)
MIME-Version: 1.0
CC: jlynch@zazu.mcit.com
Subject: Re: Netscape
References: <33A98263.41C6@zazu.mcit.com> <33AAEADD.669B@sybase.com>
Content-Type: multipart/mixed; boundary="------------167E2781446B"
Newsgroups: sybase.public.jdbcconnect
Lines: 132
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:646
Article PK: 252398

Here's the error I'm getting:

Applet demo exception: java.lang.NullPointerException: trying to call
next()V.

I also get the same error when trying to use the first, previous, next,
last routines as well.

I'm using the jConnect revision dated March 10, 1997. I'm also using
JDK 1.0.2 with Netscape Communicator 4.0b5.

The windows in the applet come up fine but it doesn't connect to the
database. That's why all the buttons to navigate don't work.

I attached the code to connect. I tried 2 servers and both work using
appletviewer but, both don't work in Netscape. I thought it might be a
config problem but wasn't sure since it works in appletviewer.

Thanks much,
Jim
jlynch@zazu.mcit.com

Lance Andersen wrote:
>
> Jim,
>
> What was the error that occured? If it works
> within the appletviewer, it should work with
> netscape.
>
> If you could provide the error, source, versions of netscape
> and jconnect that wold help
>
> thanks
>
> lance
> Jim Lynch wrote:
> >
> > I developed an applet the can connect to different databases on
> > different hosts. I'm using jConnect and JDK 1.0.2. The applet works
> > great using appletviewer, but when I try to use it in Netscape I can't
> > get any results back from the db.
> >
> > I'm not sure what exactly I'm doing wrong or if I don't have a correct
> > setup, but if you could give me a few ideas it would be greatly
> > appreciated.
> >
> > Thanks much,
> > Jim
> > jlynch@zazu.mcit.com
>
> --
> ===============================================================================
> Lance J. Andersen Email: lancea@sybase.com
> Sybase Technical Support Phone:(617) 564-6336
> 77 South Bedford Street Fax: (617) 564-6148
> Burlington, MA 01803
>
> The Dark Knight Returns!!! Let's Go Penguins!!!
> ===============================================================================

import java.awt.*;
import java.util.*;
import jdbc.sql.*;
import jdbc.sybase.utils.Debug;
import jdbc.sybase.jdbc.*;


public class LoadModelRecords extends Frame
{
Connection c;
DataPanel data;
String sql;
String query;

String server;
String port;
String dbURL;
String host;

public LoadModelRecords (String Query)
{
super();

setTitle("Node Records for Model " + Query + " - " + SNMSServerPanel.choice.getSelectedItem());
resize(500, 800);

// Make a connection to the database
try {
String driverName = "jdbc.sybase.jdbc.SybDriver";
Driver driver = (Driver)Class.forName(driverName).newInstance();
Properties p = new Properties();

//Set the User Name and Password
p.put("user", "xxxxx");
p.put("password", "xxxxx");

//Set the URL for Server
server = SNMSServerPanel.choice.getSelectedItem();
if(server.equals("NSSDEV01"))
{
host = "rafiki.mcit.com";
port = "xxxxx";
}
else if(server.equals("NSSTST01"))
{
host = "rafiki.mcit.com";
port = "xxxxx";
}

//Set the URL
dbURL = "jdbc:sybase:Tds:" + host + ":" + port;

System.out.println("dbURL is " + dbURL);

c = driver.connect(dbURL, p);

// Create the DataField component
// We want to pass the connection object,
// the SQL statement, and have it retrieve

if(Query.equals("NULL"))
sql = "select * from NODE where model = NULL";
else
sql = "select * from NODE where model = '" + Query + "'";

data = new DataPanel(c, sql);

// Add the component to the window
this.add("North", data);
}
catch (SQLException e) {}
catch (Exception e) {}

// Create and add the panel and buttons
Panel p = new Panel();
p.setLayout(new FlowLayout());
p.add(new Button("First"));
p.add(new Button("Previous"));
p.add(new Button("Next"));
p.add(new Button("Last"));
p.add(new Button("Close"));
this.add("South", p);

this.show();
}

public boolean handleEvent (Event evt) {
if ("First".equals(evt.arg)) {
data.first();
}
if ("Previous".equals(evt.arg)) {
data.previous();
}
if ("Next".equals(evt.arg)) {
data.next();
}
if ("Last".equals(evt.arg)) {
data.last();
}
if ("Close".equals(evt.arg)) {
dispose();
}

return super.handleEvent(evt);
}
}


Jim Lynch Posted on 1997-06-23 20:34:16.0Z
Message-ID: <33AEDDC8.41C6@zazu.mcit.com>
Date: Mon, 23 Jun 1997 14:34:16 -0600
From: Jim Lynch <jlynch@zazu.mcit.com>
Organization: MCI Communications
X-Mailer: Mozilla 3.0 (X11; I; AIX 1)
MIME-Version: 1.0
CC: jlynch@zazu.mcit.com
Subject: Re: Netscape
References: <33A98263.41C6@zazu.mcit.com> <33AAEADD.669B@sybase.com> <33AECBF8.41C6@zazu.mcit.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 154
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:645
Article PK: 252397

NEVERMIND!! Thanks for getting back to me but I got it working. It was
a config problem on my part.

Jim

Jim Lynch wrote:
>
> Here's the error I'm getting:
>
> Applet demo exception: java.lang.NullPointerException: trying to call
> next()V.
>
> I also get the same error when trying to use the first, previous, next,
> last routines as well.
>
> I'm using the jConnect revision dated March 10, 1997. I'm also using
> JDK 1.0.2 with Netscape Communicator 4.0b5.
>
> The windows in the applet come up fine but it doesn't connect to the
> database. That's why all the buttons to navigate don't work.
>
> I attached the code to connect. I tried 2 servers and both work using
> appletviewer but, both don't work in Netscape. I thought it might be a
> config problem but wasn't sure since it works in appletviewer.
>
> Thanks much,
> Jim
> jlynch@zazu.mcit.com
>
> Lance Andersen wrote:
> >
> > Jim,
> >
> > What was the error that occured? If it works
> > within the appletviewer, it should work with
> > netscape.
> >
> > If you could provide the error, source, versions of netscape
> > and jconnect that wold help
> >
> > thanks
> >
> > lance
> > Jim Lynch wrote:
> > >
> > > I developed an applet the can connect to different databases on
> > > different hosts. I'm using jConnect and JDK 1.0.2. The applet works
> > > great using appletviewer, but when I try to use it in Netscape I can't
> > > get any results back from the db.
> > >
> > > I'm not sure what exactly I'm doing wrong or if I don't have a correct
> > > setup, but if you could give me a few ideas it would be greatly
> > > appreciated.
> > >
> > > Thanks much,
> > > Jim
> > > jlynch@zazu.mcit.com
> >
> > --
> > ===============================================================================
> > Lance J. Andersen Email: lancea@sybase.com
> > Sybase Technical Support Phone:(617) 564-6336
> > 77 South Bedford Street Fax: (617) 564-6148
> > Burlington, MA 01803
> >
> > The Dark Knight Returns!!! Let's Go Penguins!!!
> > ===============================================================================
>
> ---------------------------------------------------------------
> import java.awt.*;
> import java.util.*;
> import jdbc.sql.*;
> import jdbc.sybase.utils.Debug;
> import jdbc.sybase.jdbc.*;
>
> public class LoadModelRecords extends Frame
> {
> Connection c;
> DataPanel data;
> String sql;
> String query;
>
> String server;
> String port;
> String dbURL;
> String host;
>
> public LoadModelRecords (String Query)
> {
> super();
>
> setTitle("Node Records for Model " + Query + " - " + SNMSServerPanel.choice.getSelectedItem());
> resize(500, 800);
>
> // Make a connection to the database
> try {
> String driverName = "jdbc.sybase.jdbc.SybDriver";
> Driver driver = (Driver)Class.forName(driverName).newInstance();
> Properties p = new Properties();
>
> //Set the User Name and Password
> p.put("user", "xxxxx");
> p.put("password", "xxxxx");
>
> //Set the URL for Server
> server = SNMSServerPanel.choice.getSelectedItem();
> if(server.equals("NSSDEV01"))
> {
> host = "rafiki.mcit.com";
> port = "xxxxx";
> }
> else if(server.equals("NSSTST01"))
> {
> host = "rafiki.mcit.com";
> port = "xxxxx";
> }
>
> //Set the URL
> dbURL = "jdbc:sybase:Tds:" + host + ":" + port;
>
> System.out.println("dbURL is " + dbURL);
>
> c = driver.connect(dbURL, p);
>
> // Create the DataField component
> // We want to pass the connection object,
> // the SQL statement, and have it retrieve
>
> if(Query.equals("NULL"))
> sql = "select * from NODE where model = NULL";
> else
> sql = "select * from NODE where model = '" + Query + "'";
>
> data = new DataPanel(c, sql);
>
> // Add the component to the window
> this.add("North", data);
> }
> catch (SQLException e) {}
> catch (Exception e) {}
>
> // Create and add the panel and buttons
> Panel p = new Panel();
> p.setLayout(new FlowLayout());
> p.add(new Button("First"));
> p.add(new Button("Previous"));
> p.add(new Button("Next"));
> p.add(new Button("Last"));
> p.add(new Button("Close"));
> this.add("South", p);
>
> this.show();
> }
>
> public boolean handleEvent (Event evt) {
> if ("First".equals(evt.arg)) {
> data.first();
> }
> if ("Previous".equals(evt.arg)) {
> data.previous();
> }
> if ("Next".equals(evt.arg)) {
> data.next();
> }
> if ("Last".equals(evt.arg)) {
> data.last();
> }
> if ("Close".equals(evt.arg)) {
> dispose();
> }
>
> return super.handleEvent(evt);
> }
> }