Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 How to change Sex from nvarchar(50) (Archived)

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
leechunsonnn Posted - 09 October 2018 : 08:51:10
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
2   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 18 October 2018 : 23:08:17
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).
HuwR Posted - 09 October 2018 : 11:00:52
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 , "


Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07