You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Fedor Karpelevitch <fe...@Barra.COM> on 2001/07/09 16:21:13 UTC

FW: [PATCH] SQL generation for MSSQL in 2.1 patch( RE: Turbine & MS S QL Server Howto)

Could anyone please commit this?
I cannot do it from here. And this need to be merged into the trunk too, I
guess...

-----Original Message-----
From: Fedor Karpelevitch [mailto:fedor.karpelevitch@barra.com]
Sent: Friday, July 06, 2001 1:27 PM
To: 'turbine-dev@jakarta.apache.org'
Subject: [PATCH] SQL generation for MSSQL in 2.1 patch( RE: Turbine & MS
S QL Server Howto)


And here is the patch (shoul be done on 2.1 branch):

Index: unique.vm
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine/conf/torque/templates/sql/base/mssql/unique.
vm,v
retrieving revision 1.1
diff -u -r1.1 unique.vm
--- unique.vm	2001/04/24 23:18:35	1.1
+++ unique.vm	2001/07/06 19:27:30
@@ -1,4 +1,3 @@
 #foreach ($unique in $table.Unices)
     UNIQUE ($unique.ColumnList),
 #end
-


> -----Original Message-----
> From: Finn Smith [mailto:fsmith@nntllc.com]
> Sent: Monday, July 02, 2001 8:32 AM
> To: turbine-user list
> Subject: Turbine & MS SQL Server Howto
> 
> 
> Here's a document that should be useful for new users with 
> Windows who want
> to get TDK 2.1 up and running with MS SQL Server. It should 
> be relevant
> until the small template changes are made for later releases (maybe in
> 2.1.1?). It contains everything you need to get TDK 2.1 
> running on Windows.
> It assumes you are working with the "TDK Howto" page on the 
> turbine website.
> 
> This document is specifically about JDK 1.2.1, TDK 2.1, MS 
> SQL Server 7.0
> and the JSQLConnect 2.25 driver from NetDirect 
> <http://www.j-netdirect.com/>
> (they have a free 30 day trial for the driver). All of these 
> are running on
> Windows. The assumption here is that you're using the default 
> webapp name of
> "newapp".
> 
> Follow the instructions in the TDK Howto. However, before step 3 (i.e.
> before you run ant) under "Creating your first Turbine 
> application" do the
> following:
> 
> in the file <tdk 
> root>/share/conf/torque/templates/sql/base/mssql/unique.vm
> :
>     Remove the blank line at the end of this file. It should 
> now be just
> three lines long.
> 
> in the directory <tdk root>/share/conf/database/ :
>     Create a text file named mssql. Put the following line in it:
>         database.adaptor = DBMSSQL
> 
> in the file <tdk root>/share/sample/conf/newapp-schema.xml
>        change <table name="RDF"> to <table name="RDF" 
> idMethod="idbroker">
> 
> (Note: You only need to make these changes once, when you 
> first download the
> TDK. Now the template files used to create new webapps are configured
> correctly. You should be able to make as many different webapps with
> different names as you want simply by editing the <tdk
> root>/build.properties file and changing "newapp" to the name 
> of the project
> that you want to use.)
> 
> Run ant as described in step 3.
> 
> Now during step 4, make these changes:
> 
> in <tdk root>/webapps/newapp/WEB-INF/build/build.properties :
>     * set the variable: database=mssql
>     * uncomment the line: database.manual.creation = true
>     * set the database variables:
>          databaseDriver = com.jnetdirect.jsql.JSQLDriver
>          databaseUser = sa
>          databasePassword =
>          databaseHost = 127.0.0.1
>          databaseUrl =
> jdbc:JSQLConnect://${databaseHost}/database=${project}&user=${
> databaseUser}
> 
> Copy the JSQLDriver.jar file (download from 
http://www.j-netdirect.com/)
into the lib directory as described.

After step 4:
     * create a database in SQL Server for Turbine to connect to. make sure
the database name
       matches the project name (in this case, "newapp").

Follow the rest of the instructions in the TDK Howto. They seem to work
fine.

I think that this covers all of the changes to get this up and running on
Windows. Hopefully this will save people some wasted time making the little
tweaks necessary to use the TDK with SQL Server.

-F


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org