473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

JON SKEET! i need your help!

you have mentioned importing actole.tlb into .net in a previous post -
i'm trying to interface with an act 6 database - so thought i'd try to
import act.tlb using tlbimp - but i'm getting self registration failed.

Do you have any sample source on how to open a database in c#?

when i used actole in the .net app and tried to connect i'm getting
error -87 can't open database...

so i thought i should try act.tlb instead, but now im getting this
self-registration error.

Can you assist at all? i'm desperate to move on with this.

Thanks,

Gary.

Mar 22 '06 #1
11 1422
how to open an 'act 6 database' i meant !

Mar 22 '06 #2

<ga********@myway.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
| you have mentioned importing actole.tlb into .net in a previous post -
| i'm trying to interface with an act 6 database - so thought i'd try to
| import act.tlb using tlbimp - but i'm getting self registration failed.
|
| Do you have any sample source on how to open a database in c#?
|
| when i used actole in the .net app and tried to connect i'm getting
| error -87 can't open database...
|
| so i thought i should try act.tlb instead, but now im getting this
| self-registration error.
|
| Can you assist at all? i'm desperate to move on with this.
|
| Thanks,
|
| Gary.
|
What if you try to start from the beginning?
Just try to open the DB using a simple script, like this:

'File : Test.vbs
Dim o
Set o= CreateObject("actole.database")
o.Open "your full dbf path"

copy this to a file named test.vbs

...
and run it from the command line using cscript test.vbs.
If this works (if it doesn't throw an error) , it means that the whole ACT
stuff is correctly installed, only then you can move on by creating the
interop library from actole.tlb, or setting a reference to the actole.tlb in
your project.

Willy.


Mar 22 '06 #3
Willy thank you for your reply - I tried what you said but it doesn't
seem to be doing much.
It didn't throw an error just returned me to a flashing command prompt.

Then i moved the database completely so the path was wrong in the
script and it still didn't give me an error just returned me to the
command prompt again.

So i'm not sure how this moves me any closer to a solution =(

Mar 22 '06 #4
Well this means that the Open command isn't doing anything at all, else it
would throw when the path was wrong.
Try this instead:

'File : Test.vbs
Dim o
Set o= CreateObject("actole.database")
Cscript.Echo o.ActVersion

Willy.
<ga********@myway.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
| Willy thank you for your reply - I tried what you said but it doesn't
| seem to be doing much.
| It didn't throw an error just returned me to a flashing command prompt.
|
| Then i moved the database completely so the path was wrong in the
| script and it still didn't give me an error just returned me to the
| command prompt again.
|
| So i'm not sure how this moves me any closer to a solution =(
|
Mar 22 '06 #5
Or try this:

dim object o
dim object c
set o = CreateObject(...)
o.Open("....")
set c= o.CONTACT
o.lock
if o.IsLocked = false then
Cscript.Echo "Unable to lock DB"
end if
o.Close

Willy.
<ga********@myway.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
| Willy thank you for your reply - I tried what you said but it doesn't
| seem to be doing much.
| It didn't throw an error just returned me to a flashing command prompt.
|
| Then i moved the database completely so the path was wrong in the
| script and it still didn't give me an error just returned me to the
| command prompt again.
|
| So i'm not sure how this moves me any closer to a solution =(
|
Mar 22 '06 #6
<ga********@myway.com> wrote:
you have mentioned importing actole.tlb into .net in a previous post -
i'm trying to interface with an act 6 database - so thought i'd try to
import act.tlb using tlbimp - but i'm getting self registration failed.

Do you have any sample source on how to open a database in c#?

when i used actole in the .net app and tried to connect i'm getting
error -87 can't open database...

so i thought i should try act.tlb instead, but now im getting this
self-registration error.

Can you assist at all? i'm desperate to move on with this.


I'm afraid I haven't done anything on this for ages, and don't have any
sample code any more. Sorry about that...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 22 '06 #7
I think this was the original post - it has some code in it for using Act.

http://groups.google.co.uk/group/mic...144694426cd695

See if it helps.

Steve.

<ga********@myway.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Willy thank you for your reply - I tried what you said but it doesn't
seem to be doing much.
It didn't throw an error just returned me to a flashing command prompt.

Then i moved the database completely so the path was wrong in the
script and it still didn't give me an error just returned me to the
command prompt again.

So i'm not sure how this moves me any closer to a solution =(

Mar 23 '06 #8
Hi i tried your example Willy but the first one did do something this
time but it was a cscript error i think, it said:
c:\test.vbs(4,1) Microsoft VBscript runtime error: Object required:
'cscript'

Mar 23 '06 #9
Steve This is the code from the link you posted but it's in basic -
can somebody convert this to c# please?

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

Mar 23 '06 #10

<ga********@myway.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
| Hi i tried your example Willy but the first one did do something this
| time but it was a cscript error i think, it said:
| c:\test.vbs(4,1) Microsoft VBscript runtime error: Object required:
| 'cscript'
|

Sorry for the typo, use Wscript.Echo instead of CScript.Echo
Willy.

Mar 23 '06 #11
Hi willy when i ran that it reported back to me
6.0.3.979

what would you reccomend as a next step? Basically i just want to start
by writing a program in .net (c# pref) that will connect to my database
and tell me the first contacts name.

Mar 23 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cor | last post by:
Jon, I did send this answer in a thread to the dotnet.languages.vb group. Forgetting that you are not so active in that newsgroup as in others. I do not like it when I write messages which the...
22
by: Marina | last post by:
Hi, Consider the following situation I have the following routine running repeatedly (curControl is a UserControl with say 1000 textboxes and a big array of strings): Public Sub...
31
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
9
by: Anders Borum | last post by:
Hello! I have a class that needs to validate the input value, when a programmer changes a specific property on a class. The input should only accept the following pattern {1,n} (alpha-numeric...
7
by: Marc Pelletier | last post by:
Hello, I am still fairly new to CSharp and am trying to implement a singleton pattern. I found Jon Skeet's excellent page (http://www.yoda.arachsys.com/csharp/singleton.html), but am struggling...
16
by: Michael C | last post by:
You know an awful lot about C#. Have you written a book I can go buy? If not, you should write one and reserve me the first copy. Thanks! Michael C.
1
by: Michael C | last post by:
Something you said the other day, about hiding an asynchronous Invoke of a UI control in a property, stuck with me. Can you point me to an example of this? BTW - I'm about 1/4th of the way...
5
by: Kieran Benton | last post by:
Hello, I'm currently in the tail end process of developing a high scalability server for my employer. Essentially it receives short socket based connections with an ASCII message, parses that...
44
by: Mantorok | last post by:
Hi all We are an organisation that use C# currently and we have some members who are not yet trained in .Net or C#, some staff have requested they use VB instead (probably due to their...
6
by: ken | last post by:
Hi all, I copied this code from the examples. "How to: Receive Strings From Serial Ports in Visual Basic" When I call the function and using the single step method it hangs at Dim Incoming As...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.