G
garyusenet
I have been trying to interface with my act database using .net and act
api's. I was originally using c# but it wouldn't connect to the
database. I tried VB in desperation and it is connecting!
Now i have hit another problem and i'm sure its down to the fact that
the code was written years ago, and needs a bit of modification for
..net can you take a look at these 12 lines of code and let me know how
to get it to work in .net please...
dim objDatabase as object
Set objDatabase = CreateObject("ACTOLE.DATABASE")
objDatabase.Open dbname
by changing the last line to : objDatabase.Open("path\database.dbf")
I've managed to open the database with no problem. I know this because
I used objDatabase.LastError and it returned an error code of 0 which
means success. And before in C# I was getting error code 87 which means
can't connect.
---
Now these next eight lines seem to be the problem, please have a look
and see if you can help me. The exame code continues as follows...
Dim tavleObject As Object
Set tableObject = objDatabase.CONTACT
tableObject.MoveFirst
(the above line generates the first error, and complains about a Null
reference exception being unhandled)
dim strOutput as String
strOutput = tableObject.Data(CF_Name)
the above line doesn't work in .net either and this is what is giving
me the problem I think...
I look forward to your comments
Gary
api's. I was originally using c# but it wouldn't connect to the
database. I tried VB in desperation and it is connecting!
Now i have hit another problem and i'm sure its down to the fact that
the code was written years ago, and needs a bit of modification for
..net can you take a look at these 12 lines of code and let me know how
to get it to work in .net please...
dim objDatabase as object
Set objDatabase = CreateObject("ACTOLE.DATABASE")
objDatabase.Open dbname
by changing the last line to : objDatabase.Open("path\database.dbf")
I've managed to open the database with no problem. I know this because
I used objDatabase.LastError and it returned an error code of 0 which
means success. And before in C# I was getting error code 87 which means
can't connect.
---
Now these next eight lines seem to be the problem, please have a look
and see if you can help me. The exame code continues as follows...
Dim tavleObject As Object
Set tableObject = objDatabase.CONTACT
tableObject.MoveFirst
(the above line generates the first error, and complains about a Null
reference exception being unhandled)
dim strOutput as String
strOutput = tableObject.Data(CF_Name)
the above line doesn't work in .net either and this is what is giving
me the problem I think...
I look forward to your comments
Gary