Jaben... you da' Man! The Sql Table Profile Provider is now working!
Couple things: First, you need to add "Gender" column with Data Type 'int' and "Birthday" column with Data Type 'datetime' to the dbo.ProfileTable_1 (when using the sample database from Sql Table Profile Provider). But don't add Gender or Birthday to the Profile properties in the web.config. If you uncomment Gender or Birthday in the code below you'll get a Configuration error, stating
"This profile property has already been defined."
<profile enabled="true" defaultProvider="TableProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<add name="TableProfileProvider"
type="Microsoft.Samples.SqlTableProfileProvider"
connectionStringName="yafnet"
table="ProfileTable_1"
applicationName="YetAnotherForumApp"/>
<!--
<add name="StoredProcedureProfileProvider"
type="Microsoft.Samples.SqlStoredProcedureProfileProvider"
connectionStringName="yafnet"
setProcedure="setCustomProfileData"
readProcedure="getCustomProfileData"
applicationName="YetAnotherForumApp"/> -->
</providers>
<properties>
<!-- config for table provider -->
<add name="FirstName" type="string" defaultValue="[null]" customProviderData="FirstName;nvarchar"/>
<add name="LastName" type="string" defaultValue="[null]" customProviderData="LastName;nvarchar"/>
<add name="Age" type="int" customProviderData="Age;int"/>
<!-- <add name="Gender" type="int" customProviderData="Gender;int"/> -->
<!-- <add name="Birthday" type="DateTime" customProviderData="Birthday;DateTime"/> -->
<!-- config for stored procedure provider -->
<!--
<add name="FirstName" defaultValue="[null]" customProviderData="FirstName;nvarchar;50"/>
<add name="LastName" defaultValue="[null]" customProviderData="LastName;nvarchar;50"/>
<add name="Age" type="int" customProviderData="Age;int;1"/>
-->
</properties>
</profile>
It seems strange that you have to add only "Gender" and "Birthday" to the dbo.ProfileTable_1
Just looking at the UserProfile.cs file, it appears that only Gender and Birthday are the only properties that are NOT a NVARCHAR data type, ex:
Location;nvarchar;255
Homepage;nvarchar;255
MSN;nvarchar;255
YIM;nvarchar;255
AIM;nvarchar;255
ICQ;nvarchar;255
GoogleTalk;nvarchar;255
Skype;nvarchar;255
Blog;nvarchar;255
BlogServiceUrl;nvarchar;255
BlogServiceUsername;nvarchar;255
BlogServicePassword;nvarchar;255
RealName;nvarchar;255
Occupation;nvarchar;400
Interests;nvarchar;400
Gender;int
Birthday;DateTime
Anyway, thanks so much for getting things to work!!!