Possible to add new column or table to database?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Possible to add new column or table to database?

Post by RickSilver » Sat Jul 25, 2009 1:41 pm

I have a need to track budgets for users and need to either add new columns to the database or add a new table.

Is this possible and if so, how?

Thanks
Rick

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Possible to add new column or table to database?

Post by jmestep » Sat Jul 25, 2009 4:30 pm

You can do either by accessing the SQL Server directly. A new table is preferable with a name that Able would never name it. If you add new fields to the existing table, you might run into problems at upgrade time.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Re: Possible to add new column or table to database?

Post by RickSilver » Sat Jul 25, 2009 4:51 pm

Thanks. How would I access the database? Is it usually stored with AbleCommerce? This is my first project with the software. Is there a free alternative to Sql Server Manager?

Rick

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Possible to add new column or table to database?

Post by mazhar » Mon Jul 27, 2009 3:00 am

Read about DAL and custom queries from here
http://wiki.ablecommerce.com/index.php/ ... uilder_API

Read following thread to auto generate code for you custom tables.
viewtopic.php?f=47&t=9530

By the way how many columns you would need? Are those columns or data would be needed for users only?

RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Re: Possible to add new column or table to database?

Post by RickSilver » Mon Jul 27, 2009 7:21 am

Thanks, I'll check those links. We want to add 3 columns: user_id, max budget, current budget, and prevent them from going over budget.

Rick

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Possible to add new column or table to database?

Post by mazhar » Mon Jul 27, 2009 7:31 am

You can also check user settings if it help you store your information. In this case there will be no need of creating custom columns etc and also DataPort would take care of importing/exporting that data in XML import/export. Read following thread about user settings
viewtopic.php?f=42&t=10487

RickSilver
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Mon Jun 22, 2009 5:49 pm

Re: Possible to add new column or table to database?

Post by RickSilver » Mon Jul 27, 2009 5:51 pm

Thanks for the great info.

I think I'm going to use the ac_usersetting table as follows:

Example for user #1:

UserSettingID: (auto-incremented)
UserID: 1
FieldName: MaxBudget
FieldValue: 1000

UserSettingID: (auto-incremented)
UserID: 1
FieldName: CurrentBudget
FieldValue: 300

Rick

Post Reply