Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 I can use it with Access but not with MS-SQL
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Eric Savanda
Starting Member

Brazil
3 Posts

Posted - 18 August 2004 :  15:23:28  Show Profile
I installed SnitzForum 2000-2001 locally using the Access .mdb database file. Everything was fine.

After that, I asked the DBA to convert the access database to MS-SQL 2000 tables. When the application tried to access the db server, it returned the following error message:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'ORDER'.
/Javaforum/default.asp, line 212


I checked the such line which stated rsForum.open strSql, my_Conn

I reasoned the the problem was the strSql string. So I inserted a few lines before line 212 in order to see the content of the variable (and also the my_Conn one - by here I only show the first)


'# START TEST
'response.write strSql & "<br>"
'response.write my_Conn
'response.end
'# END TEST


Of course, I did the same thing with the forum using the access database. Here are the two results:

FOR THE FORUM USING THE .MDB ACCESS FILE:

SELECT FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_STATUS, FORUM_FORUM.CAT_ID, FORUM_FORUM.F_SUBJECT, FORUM_FORUM.F_URL, FORUM_FORUM.F_DESCRIPTION, FORUM_FORUM.F_TOPICS, FORUM_FORUM.F_COUNT, FORUM_FORUM.F_LAST_POST, FORUM_FORUM.F_TYPE, FORUM_FORUM.F_ORDER, FORUM_FORUM.F_PRIVATEFORUMS, FORUM_FORUM.F_A_COUNT, FORUM_FORUM.F_SUBSCRIPTION, FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_NAME FROM FORUM_FORUM LEFT JOIN FORUM_MEMBERS ON FORUM_FORUM.F_LAST_POST_AUTHOR = FORUM_MEMBERS.MEMBER_ID WHERE FORUM_FORUM.CAT_ID = 8 ORDER BY FORUM_FORUM.F_ORDER ASC, FORUM_FORUM.F_SUBJECT ASC;

FOR THE FORUM USING THE MS SQL-DATABASE:

SELECT FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_STATUS, FORUM_FORUM.CAT_ID, FORUM_FORUM.F_SUBJECT, FORUM_FORUM.F_URL, FORUM_FORUM.F_DESCRIPTION, FORUM_FORUM.F_TOPICS, FORUM_FORUM.F_COUNT, FORUM_FORUM.F_LAST_POST, FORUM_FORUM.F_TYPE, FORUM_FORUM.F_ORDER, FORUM_FORUM.F_PRIVATEFORUMS, FORUM_FORUM.F_A_COUNT, FORUM_FORUM.F_SUBSCRIPTION, FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_NAME FROM FORUM_FORUM LEFT JOIN FORUM_MEMBERS ON FORUM_FORUM.F_LAST_POST_AUTHOR = FORUM_MEMBERS.MEMBER_ID WHERE FORUM_FORUM.CAT_ID = ORDER BY FORUM_FORUM.F_ORDER ASC, FORUM_FORUM.F_SUBJECT ASC;

As you can see, there is a value "8" as content of FORUM_FORUM.CAT_ID when snitz Forum uses the .mdb file but no value when it uses MS-SQL Server tables. When I alter the connection line in config.asp in may local machine to point to the MS-SQL DB server, I get exactly the same error message.

I stuck here. Can all this information help someone to find the source of this error message? What can I do to fix the problem and have SnitzForum run with MS-SQL 2000?

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 August 2004 :  16:57:23  Show Profile  Send ruirib a Yahoo! Message
You should not ask the DBA to convert the Access database to SQL Server. Here is a recommended migration approach:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=31144

Better follow it or you'll have lots of problems.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Eric Savanda
Starting Member

Brazil
3 Posts

Posted - 19 August 2004 :  08:40:39  Show Profile
quote:
Originally posted by ruirib

You should not ask the DBA to convert the Access database to SQL Server. Here is a recommended migration approach:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=31144

Better follow it or you'll have lots of problems.



Great! I read it, but there's still something I couldn´t make out:

Posted - 15 July 2002 : 21:46:05
--------------------------------------------------------------------------------

Here is how you should do it:

1. Create, or have your host create a blank database for you.
2. Run setup.asp?RC=5 to create the Snitz base tables in the database.I found the Setup.asp file - But what is the meaning of RC=5? - Am I supposed to install the forum at the application server when the tables in the SQL database are still blank and run this file from there?
3. If you have mods installed, run mod setup for each of your mods, so that the necessary changes and additions are done in the database.
4. Use DTS to transfer the data from your Access database to your SQL Server database. You should make sure that for each table the DTS transform column is configured so that any existing table data is deleted and enable identity insert is checked.

For this last step you'll need to use SQL Server's Enterprise Manager or have someone who does it for you (maybe your host, but make sure the settings I described here are used).

================================================================
Doubt: Run setup.asp?RC=5 to create the Snitz base tables in the database.


I´m not an experienced SQL server user nor an ASP expert, so excuse if this question sounds kind of silly:

I found the setup.asp file. But what is the meaning of the RC=5 parameter. Am I suppposed to install the forum at the application server with the blank MS-SQL tables created and run the setup.asp from there?

<i><font color="red">Fait que tes ręves soient plus longs que la nuit...</font id="red"></i>
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 August 2004 :  00:27:17  Show Profile  Send ruirib a Yahoo! Message
Just execute the script like that:

http://..../setup.asp?RC=5

That will recreate the SNitz forum tables in the database, erasing any existing data, which is something that is needed now.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 20 August 2004 :  03:35:09  Show Profile  Visit Gremlin's Homepage
If you just change your connection string and strDBType in config.asp you can actually just run the setup.asp without any extra parameters it should automatically do everything for you (there was a bug in an earlier version that required the ?RC=5 but you shouldn't need that now).

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 August 2004 :  06:52:55  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by Gremlin

If you just change your connection string and strDBType in config.asp you can actually just run the setup.asp without any extra parameters it should automatically do everything for you (there was a bug in an earlier version that required the ?RC=5 but you shouldn't need that now).


He has already created the DB, through Access migration or DTS as I understand, and the structure is likely incorrect, thus my recommendation.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 20 August 2004 :  10:39:21  Show Profile  Visit Gremlin's Homepage
Fair enough :), I'd be inclined to probably ask for the database to be dropped and recreated to start off 100% fresh again.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07