Hi,
thats prolly why the built-in provider does not care about fields but serializes
all data in a single string. If your provider is so tightly coupled to the
actual layout of your profile data, i wonder if a provider makes sense at
all. Maybe a for your needs tailored library makes much sense.
Don't do providers for providers sake.
That said - there is a sample profile provider implementations from MS that
store data in separate fields...
http://weblogs.asp.net/scottgu/archi...10/435038.aspx
Haven't looked at it - but maybe their code gives you pointers in the right
direction.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> I'm working against an Oracle database, trying to implement a custom
> profile provider. I have the membership and roles providers working,
> and in fact I can get the profile provider to work as well. I'm
> wondering, however, how this works logically.
>
> It seems that when I add an new property to my web.config file, it
> picks that up correctly in the application. However, unless I
> implement that in the profile provider, it will not work. It seems a
> bit useless, then, that for every property in the web.config section,
> I have to set up multiple functions (get/set) for that property to
> work correctly. The end result is a lot of extra code. I can't see a
> way to do a mass-update of all the data at one time.
>
> Also, the custom provider from the MSDN website actually deletes the
> data from profiledata table, and then does an insert to put the data
> back. The result of the default code, then, is that:
>
> Profile.FirstName = "bob";
> Profile.LastName = "marley";
> Profile.Save();
> This results in only 'marley' being saved. Bob is lost due to the
> deletion. I've modified the code to update instead of delete, but I
> still have the problem above.. for every new field I add, I have to
> modify my provider to handle it. Surely there is a better way to what
> I am doing? I'd hate to have to hit the database dozens of times
> whenever I want to update a user's record.
>
> Aaron
>