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

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

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

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

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

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

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

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