Custom SQL On Gold R6

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
LoganTheWebDev
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Thu Nov 13, 2014 9:48 am

Custom SQL On Gold R6

Post by LoganTheWebDev » Thu Nov 13, 2014 10:44 am

Was wondering how/if there was a way to do custom SQL commands in Gold R6? I found http://wiki.ablecommerce.com/index.php/ ... ries_-_AC7 which tells how to do it for AC7, but it doesn't seem to work for our version. Any help would be greatly appreciated!

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Custom SQL On Gold R6

Post by jguengerich » Thu Nov 13, 2014 2:51 pm

There's at least 2 options, I'll call them the "NHibernate way" or the ".NET SQL client" way.

Here's a little info on the first: viewtopic.php?f=65&t=17153. You'll need (at least) "using CommerceBuilder.DomainModel;".

For the second, you can get the connection string and set up a connection like this:

Code: Select all

SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["AbleCommerce"].ConnectionString);
You'll need "using System.Data.SqlClient;" and "using CommerceBuilder.Utility;" and/or "using CommerceBuilder.Common;"
Jay

Post Reply