By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,154 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,154 IT Pros & Developers. It's quick & easy.

Interfacing with a database using an API (i think...)

P: n/a
At least I think it's using an API (i don't totally understand the
concept.)

I'm using Act 6. I need to interface with the act database and add
'contacts' to the database. The reason I need to do this is because i'm

writing a little program to add a new prospect to the database when a
telephone lead rings through, the receptionist will use this program,
enter a few pieces of information and then transfer the call to the
salesman - at which point the salesman can pick up the new contact in
the Act program. This should be fairly straightforward.
I'm stuck. I cant figure out how to connect to the database. Or how to
add contacts to it. There is an extensive SDK pack which shows you how
to do this but i've had no joy (partly because the examples are in c++
and i use c# (i've only been learning it over the past couple of
months.)
PLEASE can you take a look www.strident.net/act i've included all the
files and the SDK. And can you then please offer any advice you can on
how I can do this.
So far i've managed to get access to the act namespace, but thats about

it - i can't figure out how to use it. (I got access by running tlbimp
on a .tlb file and referenceing the .dll this created - all of this has

been a very steep learning curve for me!)
I'd really appreciate your effort, i'm totally stumped at the moment.
I just need to
(a) connect to a database.
(b) write / edit it.
Thanks for your time, and do please take a look / offer any advice you
can.
Gary.

Mar 21 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Gary,

The first question I would ask is, is there any overpowering reason you must
use this database product?

After reviewing the PDF in the SDK, and visiting their web site, I am
strongly impressed that this is a poor database solution for any company
that is looking at an extensible or scalable framework for their future.
This product does not have any OLE DB or ODBC drivers, and in fact, the
documentation discourages anyone from trying to obtain or use any such
products with it. You can't even read the Help documentation online without
an account. They make only ONE product for allowing their database product
to interact with any other type of database product, and it only interacts
with Microsoft Access, and only in one direction. That product costs more
than twice as much as the database product.

It is the sort of product which may seem to be "cheap" (inexpensive) in the
short run, but the hidden costs associated with upgrading, in terms of
extensibility and scalability, which involve buying more and more
proprietary software from the company, or buying support from the company,
and/or the cost of paying a programmer for the incredible number of hours
needed to write a custom proprietary application to interact with the
database, make it a cost nightmare in the long run.

In other words, this is the sort of tar baby that very small companies,
headed by technologically ignorant people, innocently buy, thinking that
they are saving money. Eventually, assuming that the company which is using
this software prospers, it *will* have to be abandoned in favor of some real
professional, scalable, extensible product, and the longer they put it off,
the more it will cost.

If you work for this company, you have my sympathies. If you do not work for
this company, but are an independent contractor, my advice would be to
recommend a change in products, and if that recommendation is not heeded,
run, do not walk, to the nearest exit.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

<ga********@myway.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
At least I think it's using an API (i don't totally understand the
concept.)

I'm using Act 6. I need to interface with the act database and add
'contacts' to the database. The reason I need to do this is because i'm

writing a little program to add a new prospect to the database when a
telephone lead rings through, the receptionist will use this program,
enter a few pieces of information and then transfer the call to the
salesman - at which point the salesman can pick up the new contact in
the Act program. This should be fairly straightforward.
I'm stuck. I cant figure out how to connect to the database. Or how to
add contacts to it. There is an extensive SDK pack which shows you how
to do this but i've had no joy (partly because the examples are in c++
and i use c# (i've only been learning it over the past couple of
months.)
PLEASE can you take a look www.strident.net/act i've included all the
files and the SDK. And can you then please offer any advice you can on
how I can do this.
So far i've managed to get access to the act namespace, but thats about

it - i can't figure out how to use it. (I got access by running tlbimp
on a .tlb file and referenceing the .dll this created - all of this has

been a very steep learning curve for me!)
I'd really appreciate your effort, i'm totally stumped at the moment.
I just need to
(a) connect to a database.
(b) write / edit it.
Thanks for your time, and do please take a look / offer any advice you
can.
Gary.

Mar 21 '06 #2

P: n/a
Thankyou for your reply, this is the first reply i've had all day - so
I really do appreciate it.

I'm afraid i'm already commited. The thing was the company I work had
already settled on Act! as another company in the same industry had
implemented a CRM solution based on it. And it was working well for
them. The problem has come because I want to write this little program
to simply add a new contact to the database. It should be easy enough,
and someone was in the process of writing such a program for me and
gave me a prototype and then dissapeared off the face of the earth
(about 3 months ago.)

15 licences have already been purchased for this Act, by my company.
And I have purchased VS 2005 prof. with the intention of mastering c#
and this is really the first real-world project i've tried. I know
there must be a way to get this to connect. I'm very close now and have
managed to get some communication with the API - but at the moment im
getting error code 87 which means it can't open the database. If i
change the filename to a file i know doesn't exist i get error 50 (file
not found) - so by getting error 87 it does at least seem to be seeing
the file. I just can't figure out why it can't open it... here is the
code i have so far:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace actproject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
ActOle.DATABASE database = new ActOle.DATABASE();

string mydbf = @"c:\ccleasing.dbf";
database.Close();
MessageBox.Show(database.Error.ToString());
database.Open(mydbf);

MessageBox.Show(database.Error.ToString());
MessageBox.Show(database.LastError.ToString());
}

I really am dependent on the good will of experts at the moment in
these forums. So thank you again for your reply.

Mar 21 '06 #3

P: n/a
I am not familiar with ACT, but the .dbf file appears to be a standard
dBase or FoxPro database file and the .mdx file is the index. Perhaps
you can setup a dsn for a dBase or FoxPro and access it that way.

Hope this helps a little.

Mar 21 '06 #4

P: n/a
I may be an expert on .Net programming, but I know nothing about the
proprietary API of Act. Have you visited their support web site?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

<ga********@myway.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Thankyou for your reply, this is the first reply i've had all day - so
I really do appreciate it.

I'm afraid i'm already commited. The thing was the company I work had
already settled on Act! as another company in the same industry had
implemented a CRM solution based on it. And it was working well for
them. The problem has come because I want to write this little program
to simply add a new contact to the database. It should be easy enough,
and someone was in the process of writing such a program for me and
gave me a prototype and then dissapeared off the face of the earth
(about 3 months ago.)

15 licences have already been purchased for this Act, by my company.
And I have purchased VS 2005 prof. with the intention of mastering c#
and this is really the first real-world project i've tried. I know
there must be a way to get this to connect. I'm very close now and have
managed to get some communication with the API - but at the moment im
getting error code 87 which means it can't open the database. If i
change the filename to a file i know doesn't exist i get error 50 (file
not found) - so by getting error 87 it does at least seem to be seeing
the file. I just can't figure out why it can't open it... here is the
code i have so far:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace actproject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
ActOle.DATABASE database = new ActOle.DATABASE();

string mydbf = @"c:\ccleasing.dbf";
database.Close();
MessageBox.Show(database.Error.ToString());
database.Open(mydbf);

MessageBox.Show(database.Error.ToString());
MessageBox.Show(database.LastError.ToString());
}

I really am dependent on the good will of experts at the moment in
these forums. So thank you again for your reply.

Mar 21 '06 #5

P: n/a
Yes Kevin but unfortunately Act was bought out by Sage and Sage don't
provide any support for the API...

They advise not to use a directly link bypassing the API (which is what
i assume DSN is?) but now i have no other option. I'll read up on it
all and give it a go.

My one worry was that this dbf is networked but then i suddenly thought
i'm sure this DSN shouldn't have a problem working with an opened
networked database, after all - what are most databases these days are
networked anyway.

I'm a little anxious about what would happen if Act and my program
tried to update the same field at the same time, but then I guess I
just need to bite the bullet and go for it...

Thanks again!

Gary.

Mar 22 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.