hello ...
... first of all I'd like to apologize for my bad english, I'm not from english speaking
area.
I started programming in VBA/Access2k two weeks ago, I am really low on knowledge, not just on VBA but OO programming in general because all I did
until now is C/assembly. So please be patient with me =)
I need to access .dbf (dBase) database file from VBA. My first guess was ( I can't remember syntax, but something like
Dim dbRadna As Database
Set dbRadna = OpenDatabase ("c:\artikli\dstasb.dbf", ...)
which fails with error unrecognized file format or something like that. Then I figured this thing ODBC. As I see it, it is some kind of layer between
application and databases itself(right?), so if I could access it directly( I had
to learn SQL so I can communicate with ODBC anyway) , IMHO I could reach
my goal. In win98 I went C Panel/ODBC Menager/System DNS, created new
system data source, MS dBase driver (btw what is difference between
regular and VFP driver??) , directory is c:\artikli, but OpenDatabase fails
anyway (same error).
Than I saw OpenConnection. As soon as I get to my workplace, I'll try something like
Set spoj = radpr.OpenConnection("tis", <something>, <something>)
where spoj is Connection and radpr is ODBCWorkspace, and tis is the name of data source created in CP/ODBC/SDNS. So my questions would be :
1) Can dBase files be accessed from VBA ? Since I can import them, Jet understandes them. I see no reason VBA (more precisley, DAO) can't.
2) Can it be done using OpenDatabase? ( I doubt, but ... )
3) Can it be done using OpenConnection ? ( God, I hope so =).
4) Am I looking in right direction at all or am I waaaaaay off?
So If=) anyone could help me by answering these questions, or share an advice, example or expirience, it would be greatly appriciated=) Thx in
advance.
p.s. OS = win98, access2k, dao 3.6
... first of all I'd like to apologize for my bad english, I'm not from english speaking
area.
I started programming in VBA/Access2k two weeks ago, I am really low on knowledge, not just on VBA but OO programming in general because all I did
until now is C/assembly. So please be patient with me =)
I need to access .dbf (dBase) database file from VBA. My first guess was ( I can't remember syntax, but something like
Dim dbRadna As Database
Set dbRadna = OpenDatabase ("c:\artikli\dstasb.dbf", ...)
which fails with error unrecognized file format or something like that. Then I figured this thing ODBC. As I see it, it is some kind of layer between
application and databases itself(right?), so if I could access it directly( I had
to learn SQL so I can communicate with ODBC anyway) , IMHO I could reach
my goal. In win98 I went C Panel/ODBC Menager/System DNS, created new
system data source, MS dBase driver (btw what is difference between
regular and VFP driver??) , directory is c:\artikli, but OpenDatabase fails
anyway (same error).
Than I saw OpenConnection. As soon as I get to my workplace, I'll try something like
Set spoj = radpr.OpenConnection("tis", <something>, <something>)
where spoj is Connection and radpr is ODBCWorkspace, and tis is the name of data source created in CP/ODBC/SDNS. So my questions would be :
1) Can dBase files be accessed from VBA ? Since I can import them, Jet understandes them. I see no reason VBA (more precisley, DAO) can't.
2) Can it be done using OpenDatabase? ( I doubt, but ... )
3) Can it be done using OpenConnection ? ( God, I hope so =).
4) Am I looking in right direction at all or am I waaaaaay off?
So If=) anyone could help me by answering these questions, or share an advice, example or expirience, it would be greatly appriciated=) Thx in
advance.
p.s. OS = win98, access2k, dao 3.6