Posted by Mary Streetland on September 02, 2010Hi,
I have always used BDE and want to use ADO instead. However, it's not working yet. What I want to do is import a database from a local drive. I want to import a file that can be found on C:\Project\Input.dbf. How do I make the right connection? Can I do it with just a TADOTable? What do I need to fill in for connectionstring? I just want a simple connection, no passwords of other kind of things.
When I have made the right connection, is the code below appropriate to read it?
Mainform.Trucktable.Active := false; Mainform.Trucktable.TableName := FileName; Mainform.Trucktable.active :=true; Mainform.Trucktable.first;
while not Mainform.TruckTable.eof do begin Nr:=Nr+1; Capacity:=Mainform.Trucktable.FieldByName('Capacit y').AsInteger; Mainform.TruckTable.Next; end;
Mainform.TruckTable.Active := false;
You would help me a lot, thanks!