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
 How to change Sex from nvarchar(50) (Archived)
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic   

leechunsonnn
Starting Member

Australia
1 Posts

Posted - 09 October 2018 :  08:51:10  Show Profile  Reply with Quote
Mods if in wrong place please (re)move to correct area.

I am new to forums (obviously), and have been trying to locate in the code where to change the Sex/Gender information, but as yet I haven't found this, I need it to be Male = 1 or Female = 0 (I know off but still) as I require it due to the main site, I'm trying to tie the main site and Snitz together but as this is one of the issues I'm facing I cannot fully tie it in together.

Q1. Where do I change the sex/gender from full text (fe/male) to 0/1?

Q2. I know not related but would help if anyone can assist - The main site uses <%session="mainsiteuser"%>, Q how can I set Snitz to use the same session tags as the main site?

These are the main two that I really do need answered, as without them I am unable to full tie the two systems together. Aside from this I think I'll be able to tie the databases (SQL Server 2005) via foreign keys (just need to iron out the 'other keys' issue I'm having with it) but i think I can handle this section :), as the primary site database and Snitz uses different 'keys' and collations (though the collation doesn't seem to affect Snitz too much :D - Thankfully) and I honestly am still trying to wrap my head around the database aspect of the main site even after four years of dealing with it :(.

I'll leave it here for the time being. Hopefully someone better than myself can help with the section(s) of code I need to solve this issue, I've been pulling my hair out with the code, database, site, etc. for the past three weeks trying to solve it, but alas help is what I need :-|, yes doing something on this sort of scale is a nightmare - believe me I know, though I'll leave it here as I feel like I'm writing a bit of a novel now, and getting extremely tired :(.

TIA for the assistance!! I need it ;).

Almost bald as is, but after pulling so much hair out, pretty much 'scalped' now.

Cheers and thank you again.
Cristiano

HuwR
Forum Admin

United Kingdom
20448 Posts

Posted - 09 October 2018 :  11:00:52  Show Profile  Visit HuwR's Homepage  Reply with Quote
Q1. these are all the places that fetch/save the value (although you could simply turn it off in the forum, it is not required and can be removed from profile under admin options

  E:\IISTest\sf2k_v34_07\inc_create_forum_mssql.asp (2 hits)
	Line 129: 	strSql = strSql & "M_SEX " & strN & "varchar (50) NULL CONSTRAINT " & strTablePrefix & "SnitzC0372 DEFAULT &#39;&#39; , "
	Line 182: 	strSql = strSql & "M_SEX " & strN & "varchar (50) NULL DEFAULT &#39;&#39; , "
  E:\IISTest\sf2k_v34_07\inc_create_forum_mysql.asp (2 hits)
	Line 158: 	strSql = strSql & "M_SEX VARCHAR (50) DEFAULT &#39;&#39; , "
	Line 218: 	strSql = strSql & "M_SEX VARCHAR (50) DEFAULT &#39;&#39; , "
  E:\IISTest\sf2k_v34_07\inc_profile.asp (3 hits)
	Line 490: 			if rs("M_SEX") = "" then Response.Write(" selected")
	Line 497: 			if rs("M_SEX") = "Male" then Response.Write(" selected")
	Line 502: 			if rs("M_SEX") = "Female" then Response.Write(" selected")
  E:\IISTest\sf2k_v34_07\pop_lock.asp (1 hit)
	Line 172: 				strSql = strSql & " M_MSN = &#39;&#39;, M_YAHOO = &#39;&#39;, M_FIRSTNAME = &#39;&#39;, M_LASTNAME = &#39;&#39;, M_OCCUPATION = &#39;&#39;, M_SEX = &#39;&#39;, "
  E:\IISTest\sf2k_v34_07\pop_profile.asp (7 hits)
	Line 193: 		strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX"
	Line 569: 			if (strSex = "1" and Trim(rs("M_SEX")) <> "") then
	Line 572: 						"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_SEX"), "display") & "</font></td>" & vbNewLine & _
	Line 831: 		strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX"
	Line 963: 				strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_SEX"
	Line 1368: 				strSql = strsql & ",	M_SEX = &#39;" & ChkString(Request.Form("Sex"),"SQLString") & "&#39;"
	Line 1721: 						strSql = strsql & ", M_SEX = &#39;" & chkString(Request.Form("Sex"),"SQLString") & "&#39;" 
  E:\IISTest\sf2k_v34_07\pop_profile_pending.asp (3 hits)
	Line 128: 		strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS_PENDING.M_SEX"
	Line 413: 			if (strSex = "1" and Trim(rs("M_SEX")) <> "") then
	Line 416: 					"		<td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_SEX"), "display") & "</font></td>" & vbNewLine & _
  E:\IISTest\sf2k_v34_07\register.asp (4 hits)
	Line 86: 			 ", M_FIRSTNAME, M_LASTNAME, M_CITY, M_STATE, M_PHOTO_URL, M_LINK1, M_LINK2, M_AGE, M_DOB, M_MARSTATUS, M_SEX, M_OCCUPATION" & _
	Line 137: 			strSql = strsql & ", M_SEX"
	Line 177: 			strSql = strSql & ", &#39;" & chkString(rsKey("M_SEX"),"SQLString") & "&#39;"
	Line 594: 			strSql = strsql & ", M_SEX"
  E:\IISTest\sf2k_v34_07\setup.asp (7 hits)
	Line 148: 	strSql = strSql & "M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, "
	Line 162: 	strSql = strSql & "M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, "
	Line 724: 			NewColumns2(3, FieldName) = "M_SEX"
	Line 2863: 			SpecialSql8(Access) = SpecialSql8(Access) & "M_SEX text (50) NULL , "
	Line 2913: 			SpecialSql8(SQL6) = SpecialSql8(SQL6) & "M_SEX varchar (50) NULL , "
	Line 2963: 			SpecialSql8(SQL7) = SpecialSql8(SQL7) & "M_SEX nvarchar (50) NULL , "
	Line 3013: 			SpecialSql8(MySql) = SpecialSql8(MySql) & "M_SEX varchar (50) NULL , "


MVC .net dev/test site
Go to Top of Page

Carefree
Advanced Member

Philippines
4176 Posts

Posted - 18 October 2018 :  23:08:17  Show Profile  Reply with Quote
If you redirect the login from "inc_header.asp" to "login.asp", then you can add your session variables all in one place (after successful login).
Go to Top of Page
   Topic   
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2019 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07