• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MS SQL Server 2000 Support

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use MS SQL Server 2000 with JForum and I am willing to finish the integration to get it to work so that everyone else can use it as well. However, I need to know where to start. I have gotten the schema created with code from Subversion (in the JForum3). I've read all the old posts about hacks and things people have done but it's all very unclear about what is the most current code.

The latest code from the 2.1.8 release does not seem to work with SQL Server 2000 (maybe it does with 2005). I've currently just quicky thrown it up on a Tomcat instance, but long term it will be on IBM WebSphere.

I'm getting a very generic error returned from the app (c3p0 compontent I believe).

So, a few questions to help me get this figured out (after which I will deploy all the fixes for others)

1) Is there any way to get to any kind of advanced logging so I can see what actually is erroring?

2) What is the current most 'up to date' code for SQL Server 2000 that we currently have?

Here is my error:

[originally posted on jforum.net by SpuTTer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First problem solved, I just needed to add the jtds-1.2.2.jar jar in my lib and I get a better error now. Now I'm just working on the SQL itself.
[originally posted on jforum.net by SpuTTer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Update on my status. I have it up and running with most functions enabled. When I am done I will post a 2.18 database script file so others can use it to avoid some of the steps I've had to do.
[originally posted on jforum.net by SpuTTer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Could you post the changes you made to make jforum work with sql2000 ?

By the way, it's a shame that sqlserver support was made using sql2005 specific functions instead of using sql2000 functions that would have worked on every sqlserver.

I read that hibernate usage was mentionned for jforum3. It would solve these kind of problem easily, and core developpers wouldn't have to deal with db access anymore.

Dom
[originally posted on jforum.net by djeanprost]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the late reply. Here is a MS Sql 2000 script to create all your tables for 2.18. I'm not all the way done testing but it works for me so far.


[originally posted on jforum.net by SpuTTer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thank you for answering.
For what I've seen, the problem is not on the tables creation, but on the statements used by jforum when running. The specific functions that cause the problem are used in sqlserver.sql, not in sqlserver_dbstruct.sql.

Didn't you meet problems using sql2000 when running (not installing) jforum ?
dom
[originally posted on jforum.net by djeanprost]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, indeed I did! I have modified the scripts as well. Again, they may not be 100% working and I currently am using some hacks so I dont change the DAO class files but I can post what I have now, or if you wait a bit, I am planning to do it "the right way" and I'll post that stuff too.

One problem is they are using the 2005 specific commands and another is that the generic sql classes use the LIMIT function instead of TOP which messes up MSSQL.
[originally posted on jforum.net by SpuTTer]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for that choice is simple I think (though I may be wrong)

Limit allows to specify the "index from" and "number of" values, TOP ... only gives the top 10 or top 20... but always starting from 0.

To work with top statements one would have to have different dao code for mssql access, which I think was tried to be avoided ...

But that's just a guess.

I tried myself with mssql first. I got about almost all to run, but the attachments still gave me some troubles I think. So in the end I gave up on it and decided to go with the fairly well tested mysql statements... way easier to "update" too ;)
[originally posted on jforum.net by Sid]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be good if all databases supported the LIMIT operator. MS SQL does not, so it will not work with the generic SQL statements that use it.
[originally posted on jforum.net by SpuTTer]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic