Re: [jstl] sql result

2003-02-28 Thread Henri Yandell
Ack. Ignore this. On Fri, 28 Feb 2003, Henri Yandell wrote: > > Is there a better way to get an element out of a result from an > sql:query than: > > > > The only examples I've come across use forEach, which is not what I want > to go near when I expect only one row back from the query. > > W

[jstl] sql result

2003-02-28 Thread Henri Yandell
Is there a better way to get an element out of a result from an sql:query than: The only examples I've come across use forEach, which is not what I want to go near when I expect only one row back from the query. What I'd like to use is: but this obviously has issues with the namespace of th

Re: JSTL SQL

2003-02-03 Thread Jeff Wilder
ntered data to iso entities? -Jeff Travis McCauley <[EMAIL PROTECTED]> 01/29/2003 03:51 PM Please respond to "Tag Libraries Users List" To: Tag Libraries Users List <[EMAIL PROTECTED]> cc: Subject:Re: JSTL SQL Never mind, I was thinking M

Re: JSTL SQL

2003-01-29 Thread Travis McCauley
Never mind, I was thinking MySql not MS SQL Server. That certainly will not help you. Sorry, Travis What? -Mensagem original- De: Travis McCauley [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 29 de janeiro de 2003 16:51 Para: Tag Libraries Users List Assunto: Re: JSTL SQL Is

RES: JSTL SQL

2003-01-29 Thread Adeilton da Paz Souza
What? -Mensagem original- De: Travis McCauley [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 29 de janeiro de 2003 16:51 Para: Tag Libraries Users List Assunto: Re: JSTL SQL Is it possible that the data already in the database is encoded as unicode? That might explain what you

Re: JSTL SQL

2003-01-29 Thread Travis McCauley
Is it possible that the data already in the database is encoded as unicode? That might explain what you are seeing in your output. It's possible you just need to configure your browser for unicode or you might need to add the following parameters to the connection string you give the JDBC drive

JSTL SQL

2003-01-29 Thread Jeff Wilder
Using the JSTL's sql implementation when I query information from a microsoft sql server for some characters i get '?' in place of quotes or other characters. When i edit this information with my application the correct values are displayed. The '?' only appears from data already in the datab

JSTL sql

2002-10-09 Thread Stefan
Hi, Is there a way to set an 'order by' in JSTL much like you would with SQL: ORDER BY birthdate DESC Thanks, Stef -- To unsubscribe, e-mail: For additional commands, e-mail:

RE: JSTL SQL library

2002-09-08 Thread Gisella Saavedra
Thank you Shawn! It worked! -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 7:43 PM To: Tag Libraries Users List; [EMAIL PROTECTED] Subject: RE: JSTL SQL library On Sun, 8 Sep 2002, Gisella Saavedra wrote

RE: JSTL SQL library

2002-09-08 Thread Shawn Bayern
On Sun, 8 Sep 2002, Gisella Saavedra wrote: > > > > > > > > > The inner look picks up the values in the rowsByIndex order. Actually, ${row} here references a SortedMap; the order is lexical. > I tried changing the inner loop to > >

RE: JSTL SQL library

2002-09-08 Thread Gisella Saavedra
I need some help here! sessionScope.hdf is the Result variable from a query. I'm having a problem with displaying the results of a query in the order of the column names, without knowing the column names: The inner look picks

Re: JSTL SQL library

2002-09-08 Thread Shawn Bayern
On Sun, 8 Sep 2002, Gisella Saavedra wrote: > is there a way to find out the data type (metadata) of the columns > retrieved thru a query? > > I am transferring the "var" that comes back filled from a > to another JSP page. I want to format the data depending on whether > they are date columns

JSTL SQL library

2002-09-08 Thread Gisella Saavedra
is there a way to find out the data type (metadata) of the columns retrieved thru a query? I am transferring the "var" that comes back filled from a to another JSP page. I want to format the data depending on whether they are date columns, or text, or numbers?? Gis -- To unsubscribe, e-mail

Re: Updating Oracle CLOBs with JSTL sql tags

2002-08-30 Thread Mike Cantrell
Ugh, ya... it appears to be a problem with the Oracle thin-JDBC drivers. They won't even update using setAsciiStream (it throws no errors but just sets the field to null if it's over 4k). I guess I need to install the OCI drivers and give it a try. Shawn Bayern wrote: >On Thu, 29 Aug 2002,

Re: Updating Oracle CLOBs with JSTL sql tags

2002-08-29 Thread Shawn Bayern
On Thu, 29 Aug 2002, Mike Cantrell wrote: > Is there any way to get JSTL to update Oracle CLOBs with large amounts > of data? the tag works fine until it reaches the 4k limit. > Anything larger results in: > > Data size bigger than max size for this type: 27257 Do you get this because th

Updating Oracle CLOBs with JSTL sql tags

2002-08-29 Thread Mike Cantrell
Is there any way to get JSTL to update Oracle CLOBs with large amounts of data? the tag works fine until it reaches the 4k limit. Anything larger results in: Data size bigger than max size for this type: 27257 -- To unsubscribe, e-mail: For additional comm

Re: Simple JSTL SQL update fails,but only when parameters come from Netscape 4.x browser

2002-07-15 Thread Lisa Hatch
Don't know if this will help, but Netscape handles encoding differently from other browsers if a parameter contains a space, so if you are doing a GET as the post method on your form instead of POST you may want to look at the following that I googled Development Tips ... Although Internet Ex

Re: Simple JSTL SQL update fails, but only when parameters come fromNetscape 4.x browser

2002-07-15 Thread Shawn Bayern
On Sat, 13 Jul 2002, John Hicks wrote: > Everything works fine, that is, *unless* the form is posted from the > Netscape 4.73 browser!! (It works fine coming from Konqueror and Opera > 6.0 and Netscape 7 (all running under Linux) and from IE6.0 and Opera > 6.01 running in Windows. > > But when t

Simple JSTL SQL update fails, but only when parameters come from Netscape 4.x browser

2002-07-12 Thread John Hicks
Greetings All, I'm working on a fairly simple web application: posting a web form to a record in a single postgres table using JSTL, JDBC, and Postgres. Thanks to Shawn's guidance, I have it working successfully (with a prepared statement and tags plus a few tags nested inside tags). Eve

Re: JSTL sql tag error: No suitable driver

2002-07-02 Thread Mike Cantrell
Doh!, This is my fault... I tried to set the dataSource earlier by doing a : <%= ds %> Once I realized that this was going to cause the objects toString() method to be called, I changed the code to do: request.setAttribute("ds", ds); Well, I forgot to remove the which was stomping on

RE: JSTL sql tag error: No suitable driver

2002-07-02 Thread Kan Ogawa
HI, Mike. > Well, I tried that just now and I had the same result. > > I just tried getting the DataSource manually and feeding it to the tag > and got a little more descriptive error: > > <% >javax.naming.InitialContext ctx = new javax.naming.InitialContext(); > javax.sql.

Re: JSTL sql tag error: No suitable driver

2002-07-02 Thread Mike Cantrell
I'm browsing through the source of DataSourceUtil.java and the Exception is generated here: if (rawDataSource instanceof String) { try { Context ctx = new InitialContext(); // relative to standard JNDI root for J2EE app Context

Re: JSTL sql tag error: No suitable driver

2002-07-02 Thread Mike Cantrell
Well, I tried that just now and I had the same result. I just tried getting the DataSource manually and feeding it to the tag and got a little more descriptive error: <% javax.naming.InitialContext ctx = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.

RE: JSTL sql tag error: No suitable driver

2002-07-02 Thread Kan Ogawa
Hi, Mike. Did you try to look up dataSource "jdbc/dev" in tag ??? -- Kan Ogawa [EMAIL PROTECTED] > I'm trying to use the sql JSTL tags on JRun 4.0 and I'm not having any > luck with their pooled dataSources. I get the following error: > > javax.servlet.jsp.JspException: Unable to get co

JSTL sql tag error: No suitable driver

2002-07-02 Thread Mike Cantrell
I'm trying to use the sql JSTL tags on JRun 4.0 and I'm not having any luck with their pooled dataSources. I get the following error: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "No suitable driver" Here's how I'm using the tag: <%@ taglib uri="/WEB-

JSTL SQL Update tag problem

2002-06-24 Thread Roman Kapshevich
Hello! We use JSTL 1.0 and have the following problem with sql update tag: When SQL executes correctly all works fine, but when error occupier in SQL then any sql tags begins throwing the following exception: javax.servlet.jsp.JspException: SELECT TO_CHAR(dt, 'FXFMDD

Re: JSTL SQL updates: escaping quotes, default values, formvalidation, and efficiency

2002-06-21 Thread Paul DuBois
At 15:50 -0400 6/21/02, Shawn Bayern wrote: >On Fri, 21 Jun 2002, John Hicks wrote: > >> On Friday 21 June 2002 03:09 pm, you wrote: >> > > I finally traced this problem to undefined request >> > > parameter fields, specifically radio buttons and check >> > > boxes (i.e. whenever a check bo

Re: JSTL SQL updates: escaping quotes, default values, form validation,and efficiency

2002-06-21 Thread Shawn Bayern
On Fri, 21 Jun 2002, John Hicks wrote: > On Friday 21 June 2002 03:09 pm, you wrote: > >  > I finally traced this problem to undefined request > >  > parameter fields, specifically radio buttons and check > >  > boxes (i.e. whenever a check box was left unchecked or > > > when the user didn't se

Re: JSTL SQL updates: escaping quotes, default values, form validation, and efficiency

2002-06-21 Thread John Hicks
Thanks for your superfast reponse!! I'll be happy to forward you my JSP etc. (I'm not fast as you, so give me a few more minutes!!) In the meantime, one point to ponder: On Friday 21 June 2002 03:09 pm, you wrote: >  > I finally traced this problem to undefined request >  > parameter fields, s

Re: JSTL SQL updates: escaping quotes, default values, form validation,and efficiency

2002-06-21 Thread Shawn Bayern
Hi John, Thanks for your detailed message! Some responses: On Fri, 21 Jun 2002, John Hicks wrote: > 1. The KISS approach > > I first tried a simple: > > UPDATE programs > SET org = '', > name = '', > . . . . > WHERE progKey = '' > [...] > > Conclusion: W

JSTL SQL updates: escaping quotes, default values, form validation, and efficiency

2002-06-21 Thread John Hicks
Hi All-- I'm having problems with what I thought was going to be a very simple project and, after trying my best, find I must now swallow my pride and *plead* for help. The "simple" project: Updating a single SQL table using an online form with fields that correspond exactly to those of the

Re: JSTL: sql

2002-05-01 Thread Shawn Bayern
On Thu, 2 May 2002, Soefara Redzuan wrote: > But why is it even necessary to use ? Is it enough > that the JSP uses the same database connection for all tags on > the page ? I think so. and don't accept individual Connections; they operate on DataSources, and you're not guaranteed to get th

Re: JSTL: sql

2002-05-01 Thread Soefara Redzuan
Sorry I should have read this message first. >From: Paul DuBois <[EMAIL PROTECTED]> > >>The problem is not about your own thread doing several related updates, >>but some other thread doing an INSERT just after you do, >>and before you get a chance to SELECT LAST_INSERT_ID() >> >>If there is any

Re: JSTL: sql

2002-05-01 Thread Soefara Redzuan
>From: Morris Hirsch <[EMAIL PROTECTED]> >Reply-To: "Tag Libraries Users List" <[EMAIL PROTECTED]> >To: Tag Libraries Users List <[EMAIL PROTECTED]> >Subject: Re: JSTL: sql >Date: Wed, 1 May 2002 13:35:21 -0400 (EDT) > >The problem is not ab

Re: JSTL: sql

2002-05-01 Thread Shawn Bayern
On Wed, 1 May 2002, Hans Bergsten wrote: > Another alternative is to develop your own class for generating unique > IDs: > >public class IDGenerator { > public long getNextId() { >// Some algorithm, possibly based on a timestamp and a sequence >// number, to generate the

RE: JSTL: sql

2002-05-01 Thread Henri Yandell
On Wed, 1 May 2002, Baron, Elizabeth wrote: > Is this valid on Oracle as well, or just mysql? If not, is there any > "universal" way to do it? Not until JDBC 3.0 becomes standard. Or by doing it completely in Java as others have suggested. -- To unsubscribe, e-mail:

RE: JSTL: sql

2002-05-01 Thread Paul DuBois
At 13:59 -0400 5/1/02, Baron, Elizabeth wrote: >Is this valid on Oracle as well, or just mysql? If not, is there any >"universal" way to do it? > >Thanks, >Elizabeth Baron LAST_INSERT_ID() is MySQL-specific, just like AUTO_INCREMENT columns. -- To unsubscribe, e-mail:

Re: JSTL: sql

2002-05-01 Thread Hans Bergsten
Henri Yandell wrote: > Very very unlikely. I don't think any drivers provide this yet. The JDBC > 3.0 spec does have such a thing, but it's new and not really common. > > Two Options: > > 1) Find some SQL that is mysql specific to find it out. I know there is > something, I'm just not sure what.

RE: JSTL: sql

2002-05-01 Thread Baron, Elizabeth
Is this valid on Oracle as well, or just mysql? If not, is there any "universal" way to do it? Thanks, Elizabeth Baron -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 1:47 PM To: Tag Libraries Users List Subject: Re: JSTL: sql

Re: JSTL: sql

2002-05-01 Thread Martin Cooper
- Original Message - From: "Morris Hirsch" <[EMAIL PROTECTED]> To: "Tag Libraries Users List" <[EMAIL PROTECTED]> Sent: Wednesday, May 01, 2002 10:35 AM Subject: Re: JSTL: sql > The problem is not about your own thread doing several related updates, > but

Re: JSTL: sql

2002-05-01 Thread Paul DuBois
At 13:35 -0400 5/1/02, Morris Hirsch wrote: >The problem is not about your own thread doing several related updates, >but some other thread doing an INSERT just after you do, >and before you get a chance to SELECT LAST_INSERT_ID() > >If there is any chance of it (anything except a single user can

Re: JSTL: sql

2002-05-01 Thread Paul DuBois
>the only downside of that approach is if another process performs an >insert in between the time the insert is finished and select >last_insert_id() is issued. Not true. LAST_INSERT_ID() guarantees that you get the AUTO_INCREMENT value generated on your own connection, regardless of what any ot

Re: JSTL: sql

2002-05-01 Thread Morris Hirsch
The problem is not about your own thread doing several related updates, but some other thread doing an INSERT just after you do, and before you get a chance to SELECT LAST_INSERT_ID() If there is any chance of it (anything except a single user can do it) you must ensure thread safety with either

Re: JSTL: sql

2002-05-01 Thread peter lin
the only downside of that approach is if another process performs an insert in between the time the insert is finished and select last_insert_id() is issued. peter lin Paul DuBois wrote: > > At 12:56 -0400 5/1/02, Carole E. Mah wrote: > >Does anyone know if the JSTL database tags () provide a

Re: JSTL: sql

2002-05-01 Thread Paul DuBois
At 12:56 -0400 5/1/02, Carole E. Mah wrote: >Does anyone know if the JSTL database tags () provide any method for >retrieving the unique ID of the row that was inserted last (when you set >up you mySQL database table to AUTO_INCREMENT the unique id). > >This is how I do it using PHP, which provide

Re: JSTL: sql

2002-05-01 Thread Shawn Bayern
Right - there isn't a portable way of doing this with JDBC. You can use a database-specific feature to acquire the info, but note that you'll need to do this inside a tag, since the "last OID"-type features are always connection-specific, and is currently the only way of ensuring that two succe

Re: JSTL: sql

2002-05-01 Thread peter lin
this might not be the answer you're looking for, but in high end databases, the recommended method of doing incremental unique ID is to use a stored procedure which gets the next id and uses it in an insert statement. The stored procedure then passes the unique id back. autoincrement is typicall

Re: JSTL: sql

2002-05-01 Thread Henri Yandell
Very very unlikely. I don't think any drivers provide this yet. The JDBC 3.0 spec does have such a thing, but it's new and not really common. Two Options: 1) Find some SQL that is mysql specific to find it out. I know there is something, I'm just not sure what. I'll try to hunt it out. 2) Look

JSTL: sql

2002-05-01 Thread Carole E. Mah
Does anyone know if the JSTL database tags () provide any method for retrieving the unique ID of the row that was inserted last (when you set up you mySQL database table to AUTO_INCREMENT the unique id). This is how I do it using PHP, which provides the mysql_insert_id() function for just this p

Comment: JSTL SQL and auto-increment keys

2002-04-02 Thread Lev Pelekh
Hello, There seems to be a limitation in JSTL SQL taglib. As new connection is made for every query and update tag, in case of multiple inserts it makes it difficult to obtain the value of an auto-increment key from the last insert. One workaround is to use transactions, but that is a fairly

RE: jstl sql dataSource configuration help

2002-04-01 Thread James Hazel
Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 2:07 PM To: Tag Libraries Users List Subject: Re: jstl sql dataSource configuration help On Mon, 1 Apr 2002, James Hazel wrote: > my jsp code is: > >SELECT * FROM articles

[OFF-TOPIC] Re: jstl sql dataSource configuration help

2002-04-01 Thread Dave Newton
On Monday 01 April 2002 04:45 pm, James Hazel wrote: > I am a student taking a class in JSP's and my current project is to use the > jstl in a web-app tied into a database. I believe the problem I am having > derives from getting a datasource. When I was a kid I took Fortran (and Prime assembly!

Re: jstl sql dataSource configuration help

2002-04-01 Thread Shawn Bayern
On Mon, 1 Apr 2002, James Hazel wrote: > my jsp code is: > >SELECT * FROM articles > > > > > I configured the dataSource as a class implementing the javax.sql.DataSource > interface and use it in other places to create the database, but the above > query always returns as if the

jstl sql dataSource configuration help

2002-04-01 Thread James Hazel
Hi. I am a student taking a class in JSP's and my current project is to use the jstl in a web-app tied into a database. I believe the problem I am having derives from getting a datasource. my jsp code is: SELECT * FROM articles I configured the dataSource as a class implementing the javax.s

JSTL SQL tags support paging?

2002-02-19 Thread Lomvardias, Christopher
Do the JSTL SQL tags support paging of resultsets? Anyone have any real world examples? Thanks, Chris -- Chris Lomvardias [EMAIL PROTECTED] PublicBuy.Net 400 E. Pratt Street, Suite 300 Baltimore, MD 21202 (410)539-3737 x1722 voice