Fetching and updating records from another database

Fetching and updating records from another database

While I know it's possible to use a lookup field in a form to relate a record from another application, is it possible to use script to fetch records into a variable from another application?