PC Review


Reply
Thread Tools Rate Thread

Act! connection

 
 
Earl
Guest
Posts: n/a
 
      3rd Mar 2004
I am only able to connect to an Act6.0 db with ODBC Connection (Foxpro DSN).
Is there a better way?


 
Reply With Quote
 
 
 
 
Arjen Stins
Guest
Posts: n/a
 
      3rd Mar 2004
Hi,

According to msdn there is still no better way. So ODBC it has to be!

Good Luck
Arjen

"Earl comcast net>" <brikshoe<at.> wrote in message
news:(E-Mail Removed)...
> I am only able to connect to an Act6.0 db with ODBC Connection (Foxpro

DSN).
> Is there a better way?
>
>



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      3rd Mar 2004
<"Earl" <brikshoe<at>comcast<.>net>> wrote:
> I am only able to connect to an Act6.0 db with ODBC Connection (Foxpro DSN).
> Is there a better way?


Yes - use the ACT! API. Well, in some ways that's better, anyway...
you're less likely to corrupt the database when you write to it, for
example.

You can use tlbimp to import from actole.tlb. It's not pretty, as it's
not very strongly typed, but it's just about usable. Of course, you
then can't use ADO.NET at all, but there we go...

I've done quite a bit of this (unfortunately) - let me know if you have
any further questions about it.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      3rd Mar 2004
On Tue, 2 Mar 2004 21:52:32 -0500, "Earl" <brikshoe<at>comcast<.>net> wrote:

¤ I am only able to connect to an Act6.0 db with ODBC Connection (Foxpro DSN).
¤ Is there a better way?
¤

I believe you can connect using Jet OLEDB and the dBase ISAM driver as well. This would not require
a DSN.


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Earl
Guest
Posts: n/a
 
      4th Mar 2004
Jon, I'm not writing to it, just populating a DataReader with customer
contact information which will be written back to SQLServer. For now at
least, I'll stick with the ODBC connection.

One curious thing I've noticed though is that if I try to read from the
Contact field, I get an unhandled Exception (I even tried renaming the field
ContactName, but no joy). Reading fields such as Company, City, etc. I have
no problems. I'm speculating this is a null issue with the Contact field?

Thanks for your help.

"Jon Skeet [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> <"Earl" <brikshoe<at>comcast<.>net>> wrote:
> > I am only able to connect to an Act6.0 db with ODBC Connection (Foxpro

DSN).
> > Is there a better way?

>
> Yes - use the ACT! API. Well, in some ways that's better, anyway...
> you're less likely to corrupt the database when you write to it, for
> example.
>
> You can use tlbimp to import from actole.tlb. It's not pretty, as it's
> not very strongly typed, but it's just about usable. Of course, you
> then can't use ADO.NET at all, but there we go...
>
> I've done quite a bit of this (unfortunately) - let me know if you have
> any further questions about it.
>
> --
> Jon Skeet - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      4th Mar 2004
<"Earl" <brikshoe<at>comcast<.>net>> wrote:
> Jon, I'm not writing to it, just populating a DataReader with customer
> contact information which will be written back to SQLServer. For now at
> least, I'll stick with the ODBC connection.
>
> One curious thing I've noticed though is that if I try to read from the
> Contact field, I get an unhandled Exception (I even tried renaming the field
> ContactName, but no joy). Reading fields such as Company, City, etc. I have
> no problems. I'm speculating this is a null issue with the Contact field?


I'm afraid I really don't know - I haven't tried using an ODBC
connection. I believe you may also have difficulty reading email
addresses, as they're stored elsewhere in the database.

What exception are you getting though, when you try to read it, and how
are you trying to read it?

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Earl
Guest
Posts: n/a
 
      4th Mar 2004
Well, I found the problem. Seems that Act doesn't store *some* of your field
names as you define them in Act. Specifically, even if you rename the
Contact field, it will always be stored as "Name" in the .dbf file. Looks
like they just map over your database names to the main .dbf table.
Otherwise, their schema is pretty simplistic, they basically name dBase
tables with funky extensions (.hdx, .mdx, and so forth), and you can find
the e-mail addresses in the .edb table. The relational structure isn't much
either, just a handful of tables, most foreign-keyed to the same field.

"Jon Skeet [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> <"Earl" <brikshoe<at>comcast<.>net>> wrote:
> > Jon, I'm not writing to it, just populating a DataReader with customer
> > contact information which will be written back to SQLServer. For now at
> > least, I'll stick with the ODBC connection.
> >
> > One curious thing I've noticed though is that if I try to read from the
> > Contact field, I get an unhandled Exception (I even tried renaming the

field
> > ContactName, but no joy). Reading fields such as Company, City, etc. I

have
> > no problems. I'm speculating this is a null issue with the Contact

field?
>
> I'm afraid I really don't know - I haven't tried using an ODBC
> connection. I believe you may also have difficulty reading email
> addresses, as they're stored elsewhere in the database.
>
> What exception are you getting though, when you try to read it, and how
> are you trying to read it?
>
> --
> Jon Skeet - <(E-Mail Removed)>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



 
Reply With Quote
 
bnye
Guest
Posts: n/a
 
      15th Mar 2004
For .NET programming with ACT I
create two COM referrences. First referrence to the ACT.tlb and then
to the actevent.ocx. Next download the SDK. While the SDK is limited
you can usually get at the data that you need. An important decision
to make is whether your project is going to need to create the
Application Object or the Database Object. Here is the difference
when connecting.

The Application Object:


Shared ActElement As Object

Public Sub SetActElement()
Dim objApp As New Object
objApp = CreateObject("actole.appobject")

If objApp.IsDBOpen = False Then
MessageBox.Show("Failed to connect to ACT!. Open
ACT! and log on a database, then run the program again")
Application.Exit()
End If
ActElement = objApp
End Sub


The Database Object:

[code:1:42ead93459]

Shared ActElement As Object
Shared ActFields As DataSet

Public Sub SetActElement()
Dim objApp As New Object

Try

objApp =
CreateObject("actole.database")
objApp.OpenEx("")
If objApp.IsOpen = False Then
MessageBox.Show("Failed to connect to ACT!.
Open ACT! and log on a database, then run the program
again")
Application.Exit()
End If
ActElement = objApp

Catch ex As Exception

End Try
End Sub
[/code:1:42ead93459]

Good Luck,

bnye


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Assistance connection could not be established because the public key provided in this connection request did not match Spin Windows XP Basics 1 6th Nov 2005 07:13 AM
Remote Assistance connection could not be established because the public key provided in this connection request did not match Spin Windows XP General 0 4th Nov 2005 07:02 AM
Remote Assistance connection could not be established because the public key provided in this connection request did not match Spin Windows XP Work Remotely 0 4th Nov 2005 07:02 AM
Front Page: error"425 can't build data connection:connection time. =?Utf-8?B?SGVhcnRBY3Jlcw==?= Microsoft Frontpage 0 29th Sep 2004 03:31 PM
how to stop a dialup connection disconnecting every time to logout or switch user on windows xp when the connection is a shared connection =?Utf-8?B?Q3J1bQ==?= Windows XP New Users 1 12th Jan 2004 02:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:57 PM.