Author |
Topic |
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 20 August 2002 : 11:49:35
|
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
|
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... |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 22 August 2002 : 08:38:52
|
what versions of SQL are you both using.
I did not have any problems upgrading with SQL 2K |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 22 August 2002 : 08:55:04
|
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 |
|
|
pweighill
Junior Member
United Kingdom
453 Posts |
Posted - 22 August 2002 : 08:55:58
|
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. |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 22 August 2002 : 14:01:50
|
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 |
|
|
ChienFou
Starting Member
Belgium
33 Posts |
Posted - 24 August 2002 : 07:22:52
|
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.
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 24 August 2002 : 07:45:39
|
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? |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 24 August 2002 : 07:56:11
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 24 August 2002 : 08:00:46
|
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 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 13 February 2003 : 10:49:49
|
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
|
|
|
Deleted
deleted
4116 Posts |
Posted - 13 February 2003 : 11:45:19
|
Implemented the fix in the original post in v4b04a03... |
Stop the WAR! |
|
|
Deleted
deleted
4116 Posts |
Posted - 13 February 2003 : 11:49:31
|
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! |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 March 2003 : 11:29:55
|
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 |
|
|
Deleted
deleted
4116 Posts |
Posted - 08 March 2003 : 17:41:59
|
I think so I'll check them from v3.4.04 |
Stop the WAR! |
|
|
Topic |
|