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

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 (v3.4.03) BUG: inc_create_forum_mssql.asp
 Forum Locked  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 August 2002 :  11:49:35  Show Profile  Send ruirib a Yahoo! Message
In inc_create_forum_mssql.asp, line 149, the default value for the M_SHA256 column is set to '1':


	strSql = strSql & "M_SHA256 smallint NULL DEFAULT '1' )"


Since this is a smallint field, shouldn't it be set to 1 instead?


strSql = strSql & "M_SHA256 smallint NULL DEFAULT 1 )"



Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - Davio on 13 February 2003 10:51:27

ChienFou
Starting Member

Belgium
33 Posts

Posted - 22 August 2002 :  05:27:08  Show Profile  Send ChienFou an ICQ Message
Hello again, we were discussing something related to this elsewhere.
I have had to change the code to do just what you mention here
on the columns M_RECEIVE_MAIL, M_VIEW_SIG and M_SIG_DEFAULT as I kept getting the disallowed implicit datatype conversion error from my database. Changing any occurences of the string quoted variables into just straight variables fixed it. Not being totally familiar with the code (only been here a short time) I am not sure if this was intentional or an error. Also it must be that in some cases the conversion must be allowed or you would have a lot more people jumping in here

Later...
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 22 August 2002 :  08:38:52  Show Profile  Visit HuwR's Homepage
what versions of SQL are you both using.

I did not have any problems upgrading with SQL 2K
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 August 2002 :  08:55:04  Show Profile  Send ruirib a Yahoo! Message
Huw,

I didn't have a problem upgrading either (I'm on SQL 2K also), but if the field is a smallint, I don't see why you give it a default value of '1' instead of 1. And since ChienFou seemed to have a problem with it, I decided to post it as bug.


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

pweighill
Junior Member

United Kingdom
453 Posts

Posted - 22 August 2002 :  08:55:58  Show Profile
quote:
Originally posted by HuwR

what versions of SQL are you both using.

I did not have any problems upgrading with SQL 2K



inc_create_forum_mssql.asp is only used when you are doing a new install, not when upgrading.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 August 2002 :  14:01:50  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by pweighill

quote:
Originally posted by HuwR

what versions of SQL are you both using.

I did not have any problems upgrading with SQL 2K



inc_create_forum_mssql.asp is only used when you are doing a new install, not when upgrading.


This is correct and the upgrade code sets that field to 1, not '1'. I saw nothing wrong with the other fields posted by ChienFou.


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

ChienFou
Starting Member

Belgium
33 Posts

Posted - 24 August 2002 :  07:22:52  Show Profile  Send ChienFou an ICQ Message
Hi again,

OK, as I said I accepted it is my DB, I am not on SQL 2K yet and will upgrade at some time (ahem). Obviously the implicit conversion is not disallowed in the later version. I had to make a couple of changes to make it work, one was explicity set M_SHA256 to 1 not '1' in inc_create_forum_mssql.asp which was what I started discussing elsewhere with ruirib, the second was that for the same reason (implicit datatype conversion disallowed) I had to change this in register.asp for M_RECEIVE_EMAIL, M_VIEW_SIG & M_SIG_DEFAULT

Example for M_RECEIVE_MAIL
from:
strSql = strSql & ", '" & chkString(Request.Form("ReceiveEMail"),"SQLString") & "'"
to:
strSql = strSql & ", " & chkString(Request.Form("ReceiveEMail"),"SQLString")

I hope that explains what my problem was.


Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 August 2002 :  07:41:18  Show Profile  Send ruirib a Yahoo! Message
Thanks, that clarifies it indeed. I'll post a bug report on that.


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

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 24 August 2002 :  07:45:39  Show Profile
I've made the above change in register.asp already.
Actually, what happens if e-mail is turned off and there would be no value passed from the form? Would it produce an error about the value being NULL?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 August 2002 :  07:56:11  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by RichardKinser

I've made the above change in register.asp already.
Actually, what happens if e-mail is turned off and there would be no value passed from the form? Would it produce an error about the value being NULL?



Good question. I think the only way to get around it would be to test the value returned from the form and insert a 0 or a 1, depending on that. This should be valid for all three fields referred by ChienFou.

I'll try a quick test and let ya know...


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

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 August 2002 :  08:00:46  Show Profile  Send ruirib a Yahoo! Message
Well just tried it and no, it won't be a problem. Even with email turned off, the option to receive email still shows (which makes sense, since having email turned off can be a temporary status).


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

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 February 2003 :  10:49:49  Show Profile
Rui, did you create another bug report about ChienFou suggested fix?
If not, can you confirm and post the changes he suggests to be changed in the code?

Bozden, the fix in Rui's first post can be implemented in the next release.

Support Snitz Forums
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 13 February 2003 :  11:45:19  Show Profile
Implemented the fix in the original post in v4b04a03...

Stop the WAR!
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 13 February 2003 :  11:49:31  Show Profile
There is also another one for MEMBERS_PENDING... Corrected it also. Any change in members table must also be made in members_pending table...

Stop the WAR!
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 March 2003 :  11:29:55  Show Profile
Actually looking back at this bug, there are a lot of fields that are defined as integer but a string value is stored in it, across all 3 databases.

Should we make the fix to all databases? It's seems a bit silly to just change one field when their are many more that needs fixing also.

Support Snitz Forums

Edited by - Davio on 07 March 2003 11:33:08
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 08 March 2003 :  17:41:59  Show Profile
I think so I'll check them from v3.4.04

Stop the WAR!
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07