Accessing Database from a separate project

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jsmits
Lieutenant (LT)
Lieutenant (LT)
Posts: 66
Joined: Wed Sep 30, 2009 11:57 am

Accessing Database from a separate project

Post by jsmits » Fri Nov 19, 2010 11:39 am

I am implementing the custom url rewriting provider listed at http://wiki.ablecommerce.com/index.php/ ... ovider_API

I'd like to access a table in the db using a technique similar to the one here: http://wiki.ablecommerce.com/index.php/Custom_Queries

The problem is when I use the Token class from the sample project the Instance property doesn't contain a reference to the Database property.

I added the sample project to the solution for my site and then I tried adding several of the CommerceBuilder dll's as references in the sampleproject but I still can't get to the Database property.

Is there a way to do this?

User avatar
s_ismail
Commander (CMDR)
Commander (CMDR)
Posts: 162
Joined: Mon Nov 09, 2009 12:20 am
Contact:

Re: Accessing Database from a separate project

Post by s_ismail » Mon Nov 22, 2010 3:01 am

Give a try by using token like this

Code: Select all

CommerceBuilder.Common.Token.Instance.Database;

Post Reply