Community
Showing results for 
Search instead for 
Do you mean 
Reply

Contact Ole DB Grid - Show External SQL Data in ACT!

New Member
Posts: 4
Country: United States

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

Well that's good to know because we have been having the best luck with the DSN queries.  Maybe I'm doing something wrong here.  Below is the DSN query that works in Excel:

 

DSN=QuickBooks Data;DFQ=X:\Quickbooks Ent\American Consumer Shows, Inc.QBW;SERVER=QODBC;OptimizerDBFolder=%UserProfile%\QODBC Driver for QuickBooks\Optimizer;OptimizerAllowDirtyReads=N;SyncFromOtherTables=N;IAppReadOnly=Y

 

This does not work in ACT with ADODB.

 

This is the most basic DSN query that the provider lists on their website:

 

DSN=Quickbooks Data;OLE DB Services=-2;

 

This does not work in ACT either.

 

Do I need to add "ODBC;" in front of the query or something?


Thanks again for your help so far.

 

FYI:  Since the Access queries work, I've imported the Quickbooks Data into tables and then successfully pulled info from those tables from Access into ACT with ADOBD.   However, if I create the tables in Access as LINKED tables, I cannot pull the data into ACT using the same query and same connection string.

New Member
Posts: 9
Country: United States

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

Does anyone know the proper connection string to a SQL Server 8.0 DB? I know that this isn't quite right:

 

DSN=Membership Reporting;UID=nameofuser;PWD=pw;DATABASE=msr 

New Member
Posts: 9
Country: United States

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

For anyone who's interested, here's the answer:

 

Provider=SQLNCLI10;Server=[server ip];Database=msr;Uid=[username]; Pwd=[pw]; 

Highlighted
New Member
Posts: 3
Country: Poland

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

I have an idea of how to use this control for many aspects of data browsing. In my company ACT! is used mostly on laptops by mobile sales people. I want them to have access to some data from other systems in the company. My idea was to automatically create Excel worksheets with the data and place them in folder like Templates that is synced across all users. Then I can use this great plugin to display the data.

 

There is a problem though: the path to the Templates folder is different for each user (due to different database names etc). Now my question is: can I work around this problem somehow besides changing connection strings for each sales person separatley? Is there a wildcard I could use to pint to current database folder (and then to Templates folder)? Currently it only works for the folder where the program is installed (meaning if I put filename without a path plugin will look for it in the folder where program is installed) which will not work for me as this folder is not synced.

Going further: can i include the login of currently logged in person in WHERE clause of SQL statement so i can filter data contained in Excel file?

 

I would really appreciate any ideas

Tomek

Tomek
www.gemini.sc
Nickel Elite Contributor
Posts: 937
Country: USA

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

The control runs under the context of the ACT! exe. so you are correct in that it's folder orientation is the ACT! install path initially.  You're looking to point the path towards the database folder?

 

For both of the items you ask about below you should be able to do this by editing the source of the control - the path property you can programmatically set by interrogating the database for folder location.  

 

The where clause filter...

 

You'd need to pull the current user name (not a big deal)  then append the SQL string with this filter before passing the sql through the provider. It might be easier to hardcode your SQL statement (or programmatically generate it) rather than try to append to the sql property input, since you're recompiling the control anyway.

 

Hope this helps.

 

 

 

Tuned Listener
Posts: 4
Country: United States

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

I'm having trouble getting this custom control to work with ACT!2010 Premium for Windows.  I followed the basic installation instructions to attempt the Northwind demo, and get no data, nothing at all, in the tabs of the "Data Grid" Layout.  I also downloaded the source code and recompiled with Visual Studio 2008, but still no joy.

 

Is there something I'm missing here?  I'm putting the Northwind.mdb file in the "C:\Program Files\ACT\Act for Windows" folder -- that is the correct location, yes?  When I built the solution in VS2008, I got a message: "Warning 1 'Act.Framework.ComponentModel.IContactListBoundControl' is obsolete: 'Please use IMutableEntityListBoundControl instead'".  Is this control really compatible with Act 2010?

 

Nickel Elite Contributor
Posts: 937
Country: USA

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

It should be, but it would be better to change the control to use the IMutableEntityListBoundControl interface and recompile for use with ACT! 2010. 

 

What are you seeing in ACT! with this control - are you seeing a control at all just no data at run time?  If so then you probably have a bad data connection property.  if you're not seeing the control at all then it's a problem with the control (and I'm pretty sure refactoring to the new interface adn recompiling will work to fix that).

 

 

Tuned Listener
Posts: 4
Country: United States

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

I'm not seeing the control at all.  I attempted to change to the IMutableEntityListBoundControl interface last night, but I'm new to C#, and just wasn't "getting it".  Plus, this is my very first attempt at any Act! interface programming.

 

I'll take another stab at it tonight.

 

Thanks!

Nickel Elite Contributor
Posts: 937
Country: USA

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

There are some examples on this forum where I've changed the Interface - check out the Contact Web Context control I'm pretty sure I updated that one to use the new interface.  It should at least provide a sample.

 

The only tricky part is you have to cast the list control as a Contact.... from MutableEntity...  other than that it's only modifying a handful of lines of code.

 

If you struggle with this let me know and I'll find some time late next week to give it a try.

 

Allen

Tuned Listener
Posts: 4
Country: United States

Re: Contact Ole DB Grid - Show External SQL Data in ACT!

Thanks, Allen!  I was able to successfully convert the code this evening, and it works like a charm.  Your're going to make me look like a genius to my boss!  (Don't worry, I'll give credit where it's due.)  Thanks again. Very happy camper here.