tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Moss" <billm...@hotmail.com>
Subject RE: DBTags insert weirdness, sybase
Date Thu, 29 Nov 2001 22:31:04 GMT
Thanks a lot for the response,

I think I caught it. I had to add 'commit' after the insert!!

Thanks again,

Bill


----Original Message Follows----
From: Steve Johnson-Evers <SEVERS@EVERBRITE.com>
Reply-To: "Tag Libraries Users List" <taglibs-user@jakarta.apache.org>
To: 'Tag Libraries Users List' <taglibs-user@jakarta.apache.org>
CC: "'billmoss@hotmail.com'"  
<IMCEAMAILTO-billmoss+40hotmail+2Ecom@EVERBRITE.com>
Subject: RE: DBTags insert weirdness, sybase
Date: Thu, 29 Nov 2001 15:17:03 -0600
MIME-Version: 1.0
Received: from [192.18.49.131] by hotmail.com (3.2) with ESMTP id 
MHotMailBDCFF276005E400431C9C0123183E86A0; Thu, 29 Nov 2001 13:24:06 -0800
Received: (qmail 17502 invoked by uid 97); 29 Nov 2001 21:20:33 -0000
Received: (qmail 17474 invoked from network); 29 Nov 2001 21:20:33 -0000
>From taglibs-user-return-1550-billmoss Thu, 29 Nov 2001 13:24:12 -0800
Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
List-Subscribe: <mailto:taglibs-user-subscribe@jakarta.apache.org>
List-Help: <mailto:taglibs-user-help@jakarta.apache.org>
List-Post: <mailto:taglibs-user@jakarta.apache.org>
List-Id: "Tag Libraries Users List" <taglibs-user.jakarta.apache.org>
Delivered-To: mailing list taglibs-user@jakarta.apache.org
Message-ID: <563AC77EC284D411904B00D0B765E71DAF069D@corp-mail.everbrite.com>
X-Mailer: Internet Mail Service (5.5.2653.19)
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

It's a long shot, but maybe your browser is doing some caching. Do you have
meta tags on your processor page to stop browsers from caching?

If not, start the debugging process by checking your HTTP and/or DB logs to
see if you can figure out what is and is not happening. I don't know what it
could be.

-Stevers


-----Original Message-----
From: Bill Moss [mailto:billmoss@hotmail.com]
Sent: Thursday, November 29, 2001 2:49 PM
To: taglibs-user@jakarta.apache.org
Subject: DBTags insert weirdness, sybase


I'm having problems inserting to a Sybase ASA 6 DB. I'm using v1.0 DBTags,
Tomcat 4.1, jconn2, and Sybase ASA 7 running a 6.0 db file (all on Win2k).

I have a form which uses DBTags to populate various select boxes, it does
this well. The form uses one connection which is closed at the end of the
form. The form posts to a page that opens another connection, processes the
data using an insert SQL statement with getParameters to populte the values
to insert. The form parameters are getting passed. The problem is that:

The db only seems to hold 2 or 3 rows. The first form post works. The second

one sometimes works, a third post will replace the second row. A third post
will delete the previous two and it will be the only row. But then I'll be
able to post 3 times, etc. I'm using an idenity column for id which is the
primary key (identity is like auto increment). Is there some weird caching
going on...

Help!

Thanks,
Bill

my processor page follows:

<%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" prefix="sql" %>

<sql:connection id="conn2">
	<sql:url>jdbc:sybase:Tds:localhost:2638/Mooky</sql:url>
	<sql:driver>com.sybase.jdbc2.jdbc.SybDriver</sql:driver>
	<sql:userId>dba</sql:userId>
	<sql:password>sql</sql:password>
</sql:connection>


First: <%=request.getParameter("fname")%> <br>
Middle: <%=request.getParameter("mname")%> <br>
Last: <%=request.getParameter("lname")%> <br>
Age: <%=request.getParameter("age")%> <br>
Unit: <%=request.getParameter("unit")%> <br>
Gender: <%=request.getParameter("gender")%> <br>
Subtype: <%=request.getParameter("stype")%> <br>
Position: <%=request.getParameter("pos")%> <br>
Condition: <%=request.getParameter("cond")%> <br>
Description: <%=request.getParameter("descr")%> <br>
Reported to Attending: <%=request.getParameter("rtat")%> <br>
Reported to Nursing: <%=request.getParameter("rtnu")%> <br>
Reported to Pharmacy: <%=request.getParameter("rtph")%> <br>
Reported to Admin: <%=request.getParameter("rtad")%> <br>


<%-- insert a row into the database --%>
<sql:statement id="stmt1" conn="conn2">
   <%-- set the SQL query --%>
   <sql:query>

insert into holding (fname, mname, lname, age, unit, gender, stype, pos,
cond, descr, rtat, rtnu, rtph, rtad) values

(

'<sql:escapeSql><%=request.getParameter("fname")%></sql:escapeSql>',
'<sql:escapeSql><%=request.getParameter("mname")%></sql:escapeSql>',
'<sql:escapeSql><%=request.getParameter("lname")%></sql:escapeSql>',

<%=request.getParameter("age")%>,
<%=request.getParameter("unit")%>,
<%=request.getParameter("gender")%>,
<%=request.getParameter("stype")%>,
<%=request.getParameter("pos")%>,
<%=request.getParameter("cond")%>,

'<sql:escapeSql><%=request.getParameter("descr")%></sql:escapeSql>',

<%=request.getParameter("rtat")%>,
<%=request.getParameter("rtnu")%>,
<%=request.getParameter("rtph")%>,
<%=request.getParameter("rtad")%>



)
   </sql:query>
   <%-- execute the query --%>
   <sql:execute/>
</sql:statement>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   
<mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: 
<mailto:taglibs-user-help@jakarta.apache.org>



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message