Arial Software
  • Home
  • Product
    • Campaign Enterprise
    • Campaign Enterprise Upgrade
  • Support
    • Chat Now
    • Demos
    • Tutorials
    • Education/Tools
    • Newsletter Signup
    • Blog
  • Contact Us
    • About Us
    • Privacy Policy

Blog

How to Manage Database Connections with Campaign Enterprise 12

3/21/2014

1 Comment

 
Campaign Enterprise can connect to any ODBC compliant database, one that complies with Open Database Connectivity requirements. These include, but may not be limited to the following:
  • MS Access
  • MS SQL Server
  • MySQL
  • Oracle
There are three steps to go through before making data available to the end user for actually sending the campaign.
  • Set up the database connection
  • Select the table and and filters
  • Assign it to the end user

Set up database connection:
  • Determine your database type. The database connection is dependent on what database you intend to use for your email addresses. Go to connectionstrings.com and get the right connection string for your database. You will need to know the version of your database, the permissions used, the IP address and other information as specified by your database administrator. You may also need a username and password depending on how your database is administered.

    Example Strings: 
    Access: Standard Security: 
    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb; Persist Security Info=False;

    Access: With Database Password: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb; Jet OLEDB:Database Password=MyDbPassword;

    MS SQL Server: Standard Security: Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword;

    MS SQL Server: Trusted Connection: Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

    MySQL Standard Security: Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

    These are just a few examples. Go to connectionstrings.com to find the string for your database.
  • In Campaign, log in as the administrator and click the Administration link.
  • Click Database Connection Management
  • Click Add New Database Connection
    Name it something readily identifiable, "Main SQL Connection" for example
    Select the database type
    Enter the string, with any variables necessary already filled in.

    When you save the string, Campaign will automatically test the connection. You may have to tweak the syntax of your string as prompted to successfully connect.
  • If you are in a multi-user environment, make sure you assign the users and groups that have access to this connection.
Create External Email List:
You can now create a new external email list, using this connection string. All available connection strings will show in the drop down and you would select the one you need for a particular list.
  • Click Email List
  • Click Add New Email List
  • Name the list something readily identifiable "Sales Followup" for example
  • Select External and click continue
    Select the database connection from the list of available connections
    Select the table, SQL Statement option, Stored procedure or use a filter in the project by selecting "From Campaign"
    Match the columns shown, Bounce, Unsubscribe, ID and Email
    Then save the Email List
  • Enter a Bounce SQL statement if you want one.
  • Set the permissions for this connection
There are other options available for more advanced list configuration should you need it. Please contact technical support for more information. The email list will appear in the campaign to address field for those users with permission to connect to this list.

1 Comment

Indexing Your Database to Improve Performance

9/14/2012

0 Comments

 
As your database grows in size and complexity, it may affect the performance of your email marketing campaigns. Frequently, performance issues appear to some people as a sudden change, causing them to blame the program for the issue, when the problem may be much deeper. One of the best ways to improve database and campaign performance is to index your fields, especially the fields you are using for merging and updating.

According to Wikipedia
A database index is a data structure that improves the speed of data retrieval operations on a database table     at the cost of slower writes and increased storage space. Indexes can be created using one or more columns     of a database table, providing the basis for both rapid random look ups and efficient access of ordered             records. The disk space required to store the index is typically less than that required by the table (since             indexes usually contain only the key-fields according to which the table is to be arranged, and exclude all the     other details in the table), yielding the possibility to store indexes in memory for a table whose data is too         large to store in memory.

In a relational database, an index is a copy of one part of a table. Some databases extend the power of indexing by allowing indexes to be created on functions or expressions. For example, an index could be created on upper(last_name), which would only store the upper case versions of the last_name field in the index. Another option sometimes supported is the use of "filtered" indexes, where index entries are created only for those records that satisfy some conditional expression. A further aspect of flexibility is to permit indexing on user-defined functions, as well as expressions formed from an assortment of built-in functions.

When I worked on running dive meets (springboard and platform diving) for my daughter, we had a system where people would turn in dive sheets based on age brackets, gender, and diving level.  At first, we had just one inbox for the divers to turn in their dive sheets. With a total of 50 divers we could answer the questions of how many girls vs. boys are there, how many 10-11 years olds, how many novice or junior Olympic levels are there. We had to cycle through the whole pile to get those questions answered each time, but we could answer the questions pretty quickly. As the season progressed, we started having more divers come, and when it go up to 500 divers, having the one in box was crazy and it took a lot of time to answer those questions.

In the same way, using a database, a small number of records within a table can be managed pretty efficiently without any indexing.  When a question is asked of the database (filtering), the database system cycle throughs ALL of the records noting which records should be included based on the filtering criteria (ie: State='CA').  The time it takes to do this is unnoticeable until about 10 thousand records or so.  Now you start noticing a lag time, but, it is still acceptable and you are too busy to deal with it.  Time moves on, the number of records in your table is increasing (which is good!) and now your waiting 10-15-20 seconds. Then someone imports 50,000 records into the table and boom, you start getting timeouts.  You say, "this worked this morning!  And I did not change anything."  You have just crossed over into the "Indexing Zone."
 
These types of issues sneak up on you unless you have a completely static list of people to send email too. It will happen!  Now even the most seasoned database programmer can get caught in this trap.  The only way to really make sure things are in tip-top shape is awareness and maintenance.

Indexing is kind of like presorting.  Say you have a table with basic contact information in it (name, city, state, etc.).  When you add a record to the table without having any indexing, all you are doing is simply appending a piece of data onto the end of the table, no order, no nothing. Contact your database administrator today to start indexing your data and improve your email marketing performance. 

0 Comments

Sample Access .mdb Database

8/16/2012

9 Comments

 
Here is a sample MS Access database mdb file you can use.
9 Comments

How to Concatenate Data in Email Messages with Campaign Enterprise

8/8/2012

0 Comments

 
There are instances in an email marketing campaign where you may need to compile customer information out of several tables in your database, and have it appear in a dynamically formatted list in the email message.

Using standard merge fields is possible, but this often results in unwanted spaces or line breaks. The way to manage multiple data displays effectively is to use a stored procedure to concatenate the data prior to inclusion in the merged email message.

We will assume that you have a table that contains the Customer's unique ID from your regular customer table, the name of the product purchased, the name of the customer and the email address. I have named my table PurchaseDetail and the schema looks like this:

CREATE TABLE dbo.PurchaseDetail
(
ProductID int NULL,
CustomerID int NULL,
ProdName varchar(100) NULL,
CustName varchar(100) NULL,
Email varchar(100) NULL
) ON [PRIMARY]
GO


Note: There is no primary key and no default values for fields. One row is inserted for each purchased item.

We will use a stored procedure to create a row in the NewPurchases table for each unique CustomerID in the PurchaseDetail table. The stored procedure will then process each row of the PurchaseDetail table and update the Purchases field of the NewPurchases table and append the purchased item for that customer to any existing purchased items for that customer.

NewPurchases:

CREATE TABLE dbo.NewPurchase
(
CustID int NULL,
CustomerName varchar(100) NULL,
Email varchar(100) NULL,
Purchases varchar(8000) NULL
) ON [PRIMARY]
GO
ALTER TABLE dbo.NewPurchase ADD CONSTRAINT
DF_NewPurchase_Purchases DEFAULT '<br>' FOR Purchases
GO
COMMIT


Note: There is no primary key and the Purchases field has a default value of <br> so the purchased items appear in a column in your HTML email message. Also, the limitation of this field is 8000 characters. If you have more than 8000 characters of product sold to one customer, you will have to think of an alternative to this stored procedure. When this stored procedure is run, you will be able to merge the Purchases field into your Campaign Enterprise message body and have a list of products purchased by one customer. You will also have the customers name to use as a merge field in your message such as, 'Dear {CustomerName}', to personalize your message. The email address and unique id to use on the Data Source page of your campaign are also available.

Please consider another limitation of this solution. This solution is a one-time option. For instance, a scenario where you need to send more than one email to a specific customer, you will need to consider the filters to employ to have the correct list of products merge into the Purchases field. Using a date/time field is the easiest, by allowing you to filter the PurchaseDetail table on only products sold within a time frame e.g. the last month and the email is sent once a month.

Stored procedure BuildContent:

CREATE PROCEDURE dbo.BuildContent
AS
DECLARE @CustID int
DECLARE @PurchaseItem varchar (100)
DECLARE @Email varchar (100)
DECLARE @CustomerName varchar (100)


SET NOCOUNT ON

Insert into NewPurchase (CustID) (select distinct CustomerID from PurchaseDetail)

DECLARE BuildCursor CURSOR FOR
SELECT CustomerID, ProdName, CustName, Email FROM PurchaseDetail


OPEN BuildCursor
FETCH NEXT FROM BuildCursor INTO @CustID, @PurchaseItem, @CustomerName, @Email


WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE NewPurchase SET CustomerName = @CustomerName, Email = @Email, Purchases = Purchases + @PurchaseItem + '<br>' WHERE CustID = @CustID
FETCH NEXT FROM BuildCursor INTO @CustID, @PurchaseItem, @CustomerName, @Email
END
CLOSE BuildCursor
DEALLOCATE BuildCursor
GO


This is just one example of using a stored procedure with Campaign Enterprise. Stored procedures are not for everybody, as you can see they are quite technical and require a lot of trial and error. Once created however, stored procedure calls on your database can greatly reduce data management workload and improve overall email marketing efficiency.
0 Comments

De-Dupe Email Address List in MS Access

1/30/2012

1 Comment

 
_While Campaign Enterprise does contain a de-dupe (de-duplication) email address feature in the Datasource Tab when you edit a campaign, it’s best to take care of duplicate entries permanently on the source database table. Here is how to do that with Microsoft Access. You can use this query to delete records with duplicate email addresses, however, the Access table must have an autonumber type of field as the unique identifier. Here are the steps:

  1. Create a new query in design view
  2. Select the table from which you want to remove duplicate records and click Add; then Close
  3. Go to Query and select Delete Query
  4. Go to View and select SQL View
  5. Use the following SQL statement:

    DELETE *
    FROM Table1
    WHERE (ID) NOT IN (SELECT First([Table1].ID) AS ID FROM [Table1] GROUP BY [Table1].Email);


    Table1 is the table with the duplicate email addresses in it, ID is your unique id field and Email is your email address field. You will need to rename this information in the SQL Statement to match the information from the table you are using. This example will keep the first instance of the email address in your table and remove any instances after that. Backing up your original table before you run this query would be a good idea.
  6. Save and Run the Query.
It is important to keep your email list free of duplicate entries so that you don't accidentally send out multiple email messages to the same address. If you collect subscribers via web form, please consider disallowing duplicate entries in the first place. If duplicates do occur, re-run this query every so often, and as a final fail-safe, check the de-dupe during send feature on the Datasource Tab of Campaign Enterprise.
1 Comment

Database Connection Options

1/3/2012

0 Comments

 
_Campaign Enterprise is designed to work directly with any ODBC (Open Database Connectivity) compliant database. Examples of ODBC databases include SQL Server, MySQL, Oracle, DB2, and most other true relational databases. Campaign also connects directly to MS Access database .mdb or .accdb files. ACT is not a true database, is not ODBC compliant and does not directly interface with Campaign Enterprise.

In order for Campaign to communicate with a database, you must set up a database connection on the computer on which Campaign is installed. There are two types of connections you can use:
  • ODBC
  • OLE DB
ODBC
An ODBC connection is set up in your operating systems control panel. To create a new ODBC connection, find your control panel either through the start menu or using the search feature.

  • Control Panel
  • Administrative Tools
  • Data Sources (ODBC)
Once inside the ODBC area, click on the system DSN tab and add a new DSN (Data Source Name) using the connection driver for your flavor of database. Once the system DSN is named and created, it will be available in the Datasource page of the Campaign Edit screens when you click Browse. Select the name, enter any authentication necessary into the string and tab out of the field to populate the table fields.


64 Bit vs. 32 Bit Systems
A problem arises if your Campaign is built on a 64 bit operating system. The Data Sources section in the Administrative tools of the control panel uses 64 bit drivers, which do not show up in the Datasource edit screen. Campaign will only use 32 bit drivers. There are two options to avoid this problem, build 32 bit drivers, or use an OLE DB connection string.


Adding a 32 Bit DSN
Microsoft has hidden the 32 bit Data Sources (ODBC) tool to make it more difficult to find, even though there are plenty of uses for 32 bit drivers. Some of the locations may include:

  • C:\Windows\sysWOW64\ODBCad32.exe
  • C:\Windows\system32\ODBCad32.exe
  • C:\Windows\system32\en-US\ODBCad32.exe
If you are unable to find it in those directories, do a search for the ODBCad32.exe file.


Using an OLE DB Connection String
There is no clear definition as to what OLE DB stands for, but it is an alternative database connection option to using an ODBC connection. OLE DB strings are typically more functional, less restrictive, faster, and more configurable. These connections can use native clients already included in the operating system or clients you download and add. The primary resource for these types of connections is Connectionstrings.com. Some of the strings you will find on that page include:

  • SQL Server 2008, Standard Security: Provider=SQLNCLI10;Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
  • MySQL Named Pipes: Provider=MySQLProvidertype;Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
  • Oracle Dedicated Server Instance: Provider=OracleProvider;Data Source=username/password@myserver/myservice:dedicated/instancename;
Other strings are available for these databases:
  • Sybase
  • IBM DB2
  • Informix
  • Postgres SQL
  • AS/400
When connecting applications, there are several layers through which the connection must traverse. Using OLE DB, you can bypass two of these layers, which improves performance. Many OLE DB strings are less restrictive of what datatypes can be passed back and forth to Campaign. For example, ODBC does not transfer information from CLOB type fields, but OLE DB does allow interactions.

MS Access
If you are using a MS Access database, you can simply browse to the file in the directory. The database must be on the same drive on which Campaign is installed in order to work properly. If your table uses linked tables, those are not available for the write back features used by Campaign.


Regardless of the type of database you use, there is a way to connect it to Campaign to take full advantage of all the write back features available. Make sure that the connection method you use allows for updating the database.


Problems
If your OLEDB driver is not loaded on the CE computer, you have to download it and install it (making sure you get the correct 32 or 64 bit version) download it here
http://www.microsoft.com/download/en/details.aspx?id=16177

Then scroll down to "Microsoft SQL Server 2008 Native Client"
if CE is on a 32 bit machine, then download the x86 package
and install it.
0 Comments

    Archives

    December 2017
    March 2017
    July 2016
    January 2016
    May 2015
    March 2014
    January 2014
    October 2013
    August 2013
    July 2013
    June 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    May 2012
    April 2012
    March 2012
    January 2012
    December 2011

    Categories

    All
    Access
    Addresses
    Bounce
    Campaign Enterprise
    Campaign Enterprise
    Character Set
    Connections
    Cost Benefit
    Cost-benefit
    Database
    Design
    Editor
    Email Lists
    Email Marketing Director
    Email Service Providers
    How To
    How To
    Html
    Iis
    Installation
    Manage Lists
    Mysql
    Network
    News
    Newsletter
    Port Managment
    Query
    Relaying
    Saving Money
    Sending
    Smtp
    Sql
    Support
    Troubleshooting
    VERPS
    Write Backs
    Write Backs

    RSS Feed

Arial Software          info@arialsoftware.com          Ph 949.218.3852
  • Home
  • Product
    • Campaign Enterprise
    • Campaign Enterprise Upgrade
  • Support
    • Chat Now
    • Demos
    • Tutorials
    • Education/Tools
    • Newsletter Signup
    • Blog
  • Contact Us
    • About Us
    • Privacy Policy