Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking through ADO (says it is in D: when actually H:)

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
I have a program which is using a DataModule, which is working fine.

I now have a second program in the same folder using the same database and same DataModule...

I have the following code, which would list the Teams in the database:

procedure TForm1.FormCreate(Sender: TObject);
begin
DataModule1.ADOTeamNames.Open;
Team1.Items.Clear;
while not DataModule1.ADOTeamNames.EOF do
begin
Team1.Items.Add(DataModule1.ADOTeamNames.FieldBYName('Team_Name').AsString);
DataModule1.ADOTeamNames.Next;
end;

But the program keeps on saying it can't find the database at D:\Database.mdb when it is acutally at G:\GameFolder\Databse.mdb

Any ideas?

Delphi I can't get enough of you.
 
Hi,

do you set the TADOconnection.connectionstring (the one that is used by ADOTeamNames) property at runtime or design time?

--------------------------------------
What You See Is What You Get
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top