CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.classifieds_starter_kit Tags:
Item Type: NewsGroup Date Entered: 8/3/2007 8:16:56 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 35 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
thiennhien
Asp.Net User
should I store member's information in db or aspnetdb(membership profile)?8/3/2007 8:16:56 PM

0/0

Hi all,

 I have a question that I have been wondering when developing this classified kit.  Is it better to store user's information in db or aspnetdb (membership profile)?  There's a table called classified_members which stores user's info.  There's also a table in aspnetdb to store user's profile.  When I want to add more info about the user, where would be the best place to store it? Thanks for all your help. 

 

Vinh
 

smcoxon
Asp.Net User
Re: should I store member's information in db or aspnetdb(membership profile)?8/3/2007 9:28:04 PM

0/0

Hi, I guess this really depends on how many more fields you want to store. I configure additional fields in the aspnetdb by configuring profile properties in the webconfig file. E.g.  

    <profile>
      <properties>
        <add name="FirstName" />
        <add name="LastName" />
        <add name="Address1" />
        <add name="Address2" />
        <add name="Address3" />
        <add name="TownCity" />
        <add name="County" />
        <add name="PostCode" />
        <add name="PhoneNumber" />
      </properties>
    </profile>

 Then create a sub procedure that writes textbox input to the profile properties, which wll be stored in the membership database aspnet_profile table for the logged in user. E.g.

    Protected Sub BtnSaveDetails1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnSaveDetails.Click
        'Add all the personal information to the members profile database table

        Profile.FirstName = Trim(txtFirstName.Text)
        Profile.LastName = Trim(txtLastName.Text)
        Profile.Address1 = Trim(txtAddress1.Text)
        Profile.Address2 = Trim(txtAddress2.Text)
        Profile.Address3 = Trim(txtAddress3.Text)
        Profile.TownCity = Trim(txtTownCity.Text)
        Profile.County = Trim(txtCounty.Text)
        Profile.PostCode = Trim(txtPostCode.Text)
        Profile.PhoneNumber = Trim(txtPhone.Text)

    End Sub

If you have lots of additional fields, say 50 or more, then i'd set up a new table in the aspnetdb with a relationship between the aspnet_Membership table 'UserId' field (users uniqueidentifier) and a foreign key Field 'UserId' within the new table which wil also hold the additional fields.

 Hope this helps.


Regards
Smcoxon

No Gem is ever polished without some friction.
thiennhien
Asp.Net User
Re: should I store member's information in db or aspnetdb(membership profile)?8/4/2007 2:50:40 AM

0/0

 Thanks a lot for your input.  I fully understand the work that you're trying to show above.  There's already a table called classifieds_members in the database.  When would I use this table for additional fields?  What's really the use of classifieds_members table anyway when i could access right from the membership table in aspnetdb?  I am just confused about all of this membership thing right now.  Hope you can guys can help me out.  Thanks.

darkknight187
Asp.Net User
Re: should I store member's information in db or aspnetdb(membership profile)?8/4/2007 1:44:22 PM

0/0

Technically it doesn't matter which database you use for adding additional columns.

But the reason for the members table is to give the application a way of connecting the member with which ad.

 


Be sure to visit www.detelli.com

And please remember to click ?Mark as Answer? on the post that helps you.
This can be beneficial to other community members reading the thread.
smcoxon
Asp.Net User
Re: should I store member's information in db or aspnetdb(membership profile)?8/4/2007 2:21:22 PM

0/0

I've just had a quick look at the Classified starter kit and it seems that this app is using the standard membership controls, Login, Register etc, but also creating some more fields, Id, username, aspApplicationName, dateCreatedin the ClassifiedDB - ClassiFields_Members table. But the user FirstName, LastName and MemberId (taken from the ID returned by the stored procedure (InserMember), which inserts the additional member information in to the ClassiFields_Members table) are stored in the ASPNETDB - aspnet_profile table. Take a look at the Web.config Profile Properties settings and you will see FirstName, LastName and MemberId properties.

So in my opinion, this starter kit is using the standard membership controls and ASPNETDB for crating and storing all membership information. But any data specifically created for use by the application is being stored in a separate database. This is generally good house keeping. I.e. keep the app data in a separate db from the membership data. However, there is nothing to stop you from creating new tables in the ASPNETDB, I do just that in my apps. I have considered using a separate DB for my apps but this often increases the cost of your hosting service. Many hosting providers will charge more for hosting web apps that have 2, 4 or more DB's. So the choice is entirely yours but if you do not have your own IIS servers and SQL servers then you need to check out the cost of hosting multiple DB's with an ASP.NET service provider before you make your final decision.This starter kit uses a Data Access Layer and Business Logic Layer to access the information in the ClassifiedDB. Take a look at the following for useful information if you want to follow this DAL & BLL approach for your data app structure: http://www.asp.net/learn/data-access/

 


Regards
Smcoxon

No Gem is ever polished without some friction.
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
should I store member's information in db or aspnetdb(membership ... should I store member's information in db or aspnetdb(membership profile) ... Click 'Add all the personal information to the members profile ...
ASP.NET.4GuysFromRolla.com: Examining ASP.NET 2.0's Membership ... Dec 7, 2005 ... NET 2.0's Membership, Roles, and Profile - Part 1 .... which uses a SQL Server database to store authentication information. ...
Creating the Application Services Database for SQL Server The default database name for Membership, Role management, Profile, Web Parts personalization and Web events is "aspnetdb". Tags: clarification ...
DotNetSlackers: Referencing the ASPNETDB Database NET 2.0's Membership system uses a predefined SQL Server database format that includes ... was asked how to have it just use the default ASPNETDB database. ...
AS/400 Db2 - SQL0204 - *FILE not found error - ibm.software.db2 ... should i store member's information in db or aspnetdb(membership profile)? how to make this work.. classifieds city wise and search with id ...
CodeIdol - Thinking about ASP.NET 2.0 Illustrated - Profiles ... They use the same database as the membership and roles features to store ..... of the profiles system, and means that you can store information for users ...
Inside Microsoft: Membership Information and Multiple Applications Moving the discussion to the aspnetdb database, I will show that the ... in the SQLMembershipProvider's object model and will suggest strategies for ...
Scott on Writing Referencing the ASPNETDB Database. One of ASP.NET 2.0's coolest new features is the Membership system, which provides a standardized means for implementing ...
Where to store login info - ASPNETDB OR custom / user database ... My question is should I store user login (UserID / Password) info into ASPNETDB (built-in) database in ASPNET_Users table OR in my own ...
Barry's Blog : web.config for .NET 2 membership, profile, roles The data store [aspnetdb] will auto update itself. ... NET 2.0 profile provider [ which will allow for web.config change auto db change] and the table ...




Search This Site:










flagging of inappropriate ads by users?

can't rename the categories?

how to add name, address, city, state, zip/postal and phone fields on the postad page???

configure smtp e-mail settings

how to load the classified kit to 1 and 1.com

final version of classified starterkit

i dont want the page full reload when user choose another picture.

site administration

performance improvement

classifieds sub menu

e-mail query 'respond to ad' does not submit the email also sign up form when viewed in mozilla is off center!

controls/featuredad.asdx

error: cannot convert to type system.decimal

global.asax

code snippet i used in love2trade.com to send an email to me on any exception

can iinclude an image with my category headings?

dotnetnuke and classified starter kit

change text 1

disable wizard "next" button until a valid category selection is made

problem with the site: server glitch – or did i miss something?

creating an account locally

how to make the site bilingual?

help with error (could not find stored procedure 'dbo.getadsbyrandomorder')

aspnet membership ~ strewth!!!!

changing dollar sign to pound sign

plenty of css templates to choose for classified starterkit

make menu tabs selected

first asp.net classifieds kit upload to server.. help

uploaded images are not deleted.

missing stored procedures

  Privacy | Contact Us
All Times Are GMT