Query personalization data in Asp.net 2.0

Y

Ya Ya

I am using the personalization feature in asp.net 2.0

I am storing the phone number for each user.

When a certain user enters his phone number I would like to check if another
user already store this phone number.

Is it possible to query personalization data so I will be able to retrieve
the phone number of each user?



Thanks

(e-mail address removed)
 
B

Brock Allen

You're using the Profile feature, not the Personalization feature (Personalization
is for WebParts).

Anyway, your problem is that the storage of the profile data is provider
dependant, meaning it's up to the provider to decide how to store that data.
The SqlProfileProvider (the default) jams all the data into one of two columns,
making direct reporting and SQL queries difficult. You need to either 1)
figure out a way to query the provider to crack apart its encoding of the
data to satisify your query or 2) use a different provider that will store
the data in a way your prefer (for easier querying).

For #1 its not easy since the encoding of the values... this would mean every
row would have to get loaded and decoded. So you don't have the benefit of
the column being indexed, or anything like that. So this is probabaly not
the best option.

For #2 there's a different provider called the "Table and Stored Proc Profile
Provider" which maps the profile property values to either distinct columns
in a table or distinct parameters to a stored proc. I'd suggest loking into
this. Google for it -- it's on MSDN or www.asp.net somewhere...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top