You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Xavier Prélat <pr...@wcentric.com> on 2002/06/21 15:49:45 UTC

dbtags - simple SQL connection

Hi,

I've been start playing with DBtags for 2 hours now, and I can't get
something else than 500 null!!

I just want to connect to a MSSQL 2000 using a jsp page.
My datasource ("MyDataSourceName")is well recognized by my Jrun 4
(jdbc:obdc).

because I'm not familiar with this stuff, I'd like to know what kind of way
I have to follow to fix it, even if I guess it's a very simple problem...I
can't resolve just because I am a newbie!

To find out what's going on, I've reduced the .jsp to its minimum!

================================================
<%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" prefix="sql" %>
<%-- open a database connection --%>
<sql:connection id="conn1" dataSource="MyDataSourceName" >
</sql:connection>

<sql:closeConnection conn="conn1"/>
=================================================

Any ideas ?

Regards,

Xavier


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: dbtags - simple SQL connection

Posted by John Hicks <ja...@gulfbridge.net>.
Xavier--

You might try doing the same task using the Java Standard 
Tag Library (JSTL) instead of the Dbtags library. JSTL has 
a subset of tags for SQL operations (using the same SQL 
prefix) that seem a little more user friendly than dbtags.

You'll find it at 
http://jakarta.apache.org/taglibs/index.html

(I'm a novice to this stuff as well and was just sitting 
down to post a major problem I'm having with JSTL when I 
saw your post, so I can't say JSTL is a piece of cake!)

Good luck,

--John


On Friday 21 June 2002 09:49 am, you wrote:
> Hi,
>
> I've been start playing with DBtags for 2 hours now, and
> I can't get something else than 500 null!!
>
> I just want to connect to a MSSQL 2000 using a jsp page.
> My datasource ("MyDataSourceName")is well recognized by
> my Jrun 4 (jdbc:obdc).
>
> because I'm not familiar with this stuff, I'd like to
> know what kind of way I have to follow to fix it, even if
> I guess it's a very simple problem...I can't resolve just
> because I am a newbie!
>
> To find out what's going on, I've reduced the .jsp to its
> minimum!
>
> ================================================
> <%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags"
> prefix="sql" %> <%-- open a database connection --%>
> <sql:connection id="conn1" dataSource="MyDataSourceName"
> > </sql:connection>
>
> <sql:closeConnection conn="conn1"/>
> =================================================
>
> Any ideas ?
>
> Regards,
>
> Xavier

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>