You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by uf...@gmx.net on 2002/03/19 16:41:42 UTC

Howto talk to a MSSQL db?

Hi,

problem is this. I am new to Turbine and use the 2.1 release. Generating the
sample app went nicely until I tried to implement the 'GETTING STARTED
GUIDE'. I tried to change the parameters in the
${TDK.HOME}/webapps/WEB-INF/build/build.properties. Now comes the problem: My shop is using an MSSQL database,
which is not supported in this release, i.e. the database variable won't take
a, say, mssql value because it is not implemented in
tdk/share/conf/database.

I searched the user Mail archive and the Turbine website. Got two, in my
view, conflicting results:

Brian Kidney posted on Jan 11, 2002 that the driver should be specified in
the Turbine.properties file. The web site says (Database Adapters) that one
needs to extend org.apache.turbine.util.db.adapter.DB.

Help is highly appreciated. Pointing me to resources/posts/post
headlines/post dates/sample code is appreciated, too.

Cheers 
Bernard


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


Re: Howto talk to a MSSQL db?

Posted by uf...@gmx.net.
Thanks!

Bernard


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


Re: Howto talk to a MSSQL db?

Posted by Jeff Jones <jj...@trap9.com>.
I have the TDK working on Turbine-2.1, but had to jump through some hoops
(and pretend I was using sybase).

I ran into an apparent bug in table.vm when trying to use 'mssql' as the
specified database:

C:\home\jjones\tdk\webapps\newapp\WEB-INF\build\build.xml:207: Exception
thrown
by 'generator.parse'. For more information consult the velocity log.

    velocity log shows:

Tue Mar 19 09:51:10 PST 2002   [info] ResourceManager : found
sql/base/mssql/unique.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Mar 19 09:51:10 PST 2002  [error] Method chop threw exception for
reference $strings in template sql/base/mssql/table.vm at  [14,24]
Tue Mar 19 09:51:10 PST 2002  [error] Method parse threw exception for
reference $generator in template sql/base/Control.vm at  [28,17]

I tried messing with table.vm a bit, to no avail (for example, I got the
tables created, but then the referential integrity constraint sql wouldn't
load).  So I gave up on the mssql .vm's.  Maybe a newer version of Torque
has fixed this.

I used the 'sybase' setting, and everything worked fine.

You do need to follow the instructions in the mssql-howto (about manual
database & user creation).

In addition, for the sample app to work, I had to mess with a line in
[project]-schema.xml:

change
    <table name="RDF">
to
    <table name="RDF" idMethod="idbroker">

to get the idBroker to handle that table's ID's.  Without this change, the
sample app kept supplying 'null' for new RdfID's.  I don't know how to get
torque to work with mssql's identity fields, but I prefer using the idBroker
anyway.

I had bad luck with Microsoft's 'beta' JDBC driver - I kept getting
transaction errors. Apparently manual transactions are on by default, and I
haven't taken the time to figure out the proper URL or setting to turn it
off.

I am using Ashna's JTurbo driver with no problems.

I tried this process on both Windows 2K and RedHat 7.2, with equal results
(as expected).

Hope that helps a bit.
Jeff

>
> On Tuesday, March 19, 2002, at 08:41  AM, ufans@gmx.net wrote:
>
> > Help is highly appreciated. Pointing me to resources/posts/post
> > headlines/post dates/sample code is appreciated, too.
>
> Have you looked at either of these?
>
> <http://jakarta.apache.org/turbine/turbine-2/howto/mssql-howto.html>
> <http://jakarta.apache.org/turbine/turbine-2/howto/sybase-howto.html>
>
> Some have reported that MSSQL will work with the
> sybase configuration stuff.
>
> Hope that helps.
> -Eric



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


Re: Howto talk to a MSSQL db?

Posted by Eric Dobbs <er...@dobbse.net>.
On Tuesday, March 19, 2002, at 08:41  AM, ufans@gmx.net wrote:

> Help is highly appreciated. Pointing me to resources/posts/post
> headlines/post dates/sample code is appreciated, too.

Have you looked at either of these?

<http://jakarta.apache.org/turbine/turbine-2/howto/mssql-howto.html>
<http://jakarta.apache.org/turbine/turbine-2/howto/sybase-howto.html>

Some have reported that MSSQL will work with the
sybase configuration stuff.

Hope that helps.
-Eric

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