Setting database name via code

I posted this queryin the wrong Borland Delphi newsgroup, so I am posting it
here again.

I am new to Delphi Professional with a VB background.  As practice I have
written several simple programs to familiarize myself with the Object Pascal
language and the Delphi components.

My latest project was to display a Microsoft Access table in a DbGrid.  To
do this, though, I had to first use the ODBC Data Source Administrator in
the Windows Control Panel to set up a DSN for the particular database.
After doing this I was able to select this database and its table I wanted
in the Delphi Object Inspector for the TTable associated with the DbGrid.

Can this be done in code?  I have tried something like
form1.Table1.databasename := 'the path to the database', but this doesn't
work for my Access Database.

Second question:  If this can't be done, how do you install such a database
application on a client machine without manually setting up a DSN for the
database on that machine also?