Community
Showing results for 
Search instead for 
Do you mean 
Reply

OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

Copper Super Contributor
Posts: 138
Country: United States

OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

At our annual Insights Conference the week of May 12th, a demonstration and code snippet was provided to showcase a recently-added feature/ability to the SDK (the ACT! Framework).  This new ability allows the SDK consumer to acquire a connection string to the ACT! OLE/DB Reporting Provider – essentially providing a “pass thru” connection once the user has been authenticated (logged into) the ACT! database. 

 

 

This feature was introduced in version 10.01, but has not yet been “widely advertised” until now. The new Framework property is CurrentACTOLEDB.  This property will return the full connection string needed to using the current logged-on context. It is important to note that the connection string is only valid during the time the user is actively connected to the ACT! application. Here’s an example of the connection string that’s returned: 

 

Provider=ACTOLEDB.1;Data Source=C:\Users\chuffman\Documents\ACT\ACT For Windows 10\Databases\Act10Demo.pad;User Id=Chris Huffman;Password=7685259a-b90a-4479-befe-2f8edcbe8ca9 

 

In order to use the new property, here’s an example using a brief code snippet: 

 

 

using System.Data.OleDb;

 

private void Connect_Click(object sender, EventArgs e)

{

this.ACTOLEDB.Text = this.actApp.ActFramework.CurrentACTOLEDB;

using (OleDbConnection connection = new OleDbConnection(this.ACTOLEDB.Text))

      {

           try

           {

                connection.Open();

                //construct whatever SQL query you want here, etc...

                Console.WriteLine("ServerVersion: {0} \nDataSource: {1}", connection.ServerVersion,  connection.DataSource);

           }

           catch (Exception ex)

           {

                Console.WriteLine(ex.Message);

           }

           // The connection is automatically closed when the code exits the using block.

      }

}      

 

 

I’ll soon be posting some sample Dashboard Components created using the ACT! Framework and this new OLE/DB Connection String property.  This will appear in the Downloads section.  As you can imagine, having this ability and the various Reporting Views (VRP*) exposed within the context of the application has some great potential.   Later, I’ll post some sample queries which can be used to populate lists (data grids), charts and reports including the Crystal Reports available and included with Visual Studio 2005 and 2008. 

Bill Blakey
ACT! Development Team
Sage Software

New Member
Posts: 2
Country: Pak

Re: OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

Hi,

i am using same connection string as you mention but one of my query is taking time and because of that i am getting an error "Timeout Expire"..I use "Connection Timeout=30;" in the connection string but its not accepting...I just want to know how we can change the connnection timeout time.

Any one can reslove my issue?

Thanks

Regards
Nouman Sarwar
Copper Super Contributor
Posts: 138
Country: United States

Re: OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

Nouman, you're probably not timing-out on the CONNECTION, rather the COMMAND. Add a Command Timeout attribute to the connection string - I do not recall the exact synctax off-hand. Since your query is timing out, you need to set that as the default is 30 seconds.

Hope that helps.

Bill Blakey
ACT! Development Team
Sage Software

Copper Super Contributor
Posts: 138
Country: United States

Re: OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

So I just added the following comment and code snippet on the Downloads page for my sample OLE/DB Dashboard Components for Users and Teams. Remember that the query timeout is an attribute of the Command and not the Connection:

OleDbCommand odbCommand = new OleDbCommand();
OleDbCommand command = odbConnection.CreateCommand();
command.CommandType = CommandType.Text;
command.CommandTimeout = 60;
command.CommandText = filteredSQLString;
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(command);
dataAdapter.Fill(dataSet);

Bill Blakey
ACT! Development Team
Sage Software

Copper Contributor
Posts: 70
Country: USA

Re: OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

Wow Bill,

YOU are the man!

Outta sight Dude! Wowsville!

I just added this to my MiddleWare SDK and have tested it with my Browser for ACT - it works a TREAT.

So now I can use VB 6.0 (or any other programming language - with or w/out .net) to INSTANTLY browse the available tables and tie them back to the "Current Contact Lookup" where applicable.

Thank you so much for posting this brilliant new function!

Cheers,
Kevin
=================
Kevin Ritch
V8Software.com
New York, London & Toronto
Highlighted
Copper Contributor
Posts: 70
Country: USA

Re: OLE/DB Reporting Provider connection string within the ACT! SDK/Framework

Had to re-post in order to add the TOP Rating for your post.

Didn't realize when I posted my last.

Again - this is GREAT !!!!

Cheers,
Kevin