Well, I guess I should specify that I'm using MySQL as the back end.
I managed to get JSP to keep the session open by wrapping the
<sql:insert> that I was talking about along with the <sql:query> in a
<sql:transaction> set (I think). What I've got right now is basically
<sql:transaction dataSource=3D"${whatever}">
<sql:insert>
INSERT INTO blah
(one, two, three)
VALUES (?, ?, ?)
...the corresponding <sql:param ...> statements...
</sql:insert>
<sql:query var=3D"pId">
SELECT LAST_INSERT_ID() FROM blah
</sql:query>
</sql:transaction>
That particular jsp fragment crashed completely on me when I had the
semicolon after LAST_INSERT_ID(), so I removed it.
Now I'm getting back as a value for ${pId}:
org.apache.taglibs.standard.tag.common.sql.ResultImpl@[EMAIL PROTECTED]
sure where to go from here, but I think you guys have helped me
get a little further... Any other ideas? (And it's all much
appreciated)
Damon Getsman
-=3D-=3D-
Programmer/Systems Administrator
ITRx - http://www.itrx-nd.com/
-=3D-=3D-
On Sep 11, 1:51=A0pm, Mark Space <marksp...@[EMAIL PROTECTED]
> wrote:
> I'm guessing here but probably something like:
>
> <sql:query>
> =A0 =A0select LAST_INSERT_ID();
> </sql:query>
>
> Do a search on that sql function, see what comes up. It's connection
> oriented so I'm hoping the JSP will maintain an open connection for ya.


|