Re: Can I set relative paths for linked tables instead of absolute path?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hyko <none@xxxxxxxxxxxxxxxxx> wrote in
news:BFA90D5C.7C8E%none@xxxxxxxxxxxxxxxxx:

> If I link a table to my Access DB from another Access DB the absolute
> path to this DB is used. When I upload the database to the server,
> where I use the databases as data source for a web application it
> cannot find this path of course.
>

As long as the (front end) mdb knows, or can find out, the site of the
back end file, you can write a short subroutine that will update the
..connect property of the relevant tabledefs:

strConnect = ";DATABASE=" & strPathToMDBFile
For p = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(p)
If tdf.Attributes And DB_ATTACHEDTABLE Then
If tdf.Connect <> strConnect Then
tdf.Connect = strConnect
tdf.RefreshLink
End If
End If
Next p

Note that this is uses the DAO library: it's probably possible using ADOX
but I can't imagine why anyone would want to...

All the best


Tim F

.



Relevant Pages

  • Re: inserting images into mysql database using matlab
    ... I would like to know how to insert images into mysql database and how to retrieve and display the inserted images. ... // declare a connection by using Connection interface Connection connection = null; ... /*declare a resultSet that works as a table resulted by execute a specified sql query. ... System.out.println("unsucessfull to upload image."); ...
    (comp.soft-sys.matlab)
  • Re: inserting images into mysql database using matlab
    ... First create database named 'anju' by query given below: ... // declare a connection by using Connection interface ... /* executeUpdate() method execute specified sql query. ... System.out.println("unsucessfull to upload image."); ...
    (comp.soft-sys.matlab)
  • ComponentAce are pirates?
    ... I downloaded an Absolute DB from ComponentAce to evaluate some time ago. ... But recently I found an Accuracer Database of the AidAim Software which appeared to be very similar to the AbsoluteDB. ... I decided to learn what is the relationship between ComponentAce and Aidaim and why the databases look so much alike. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: I lose data, when I try to save a loaded DataTable on the click of another button in an asp.net
    ... that allows for the upload of an excel sheet into the database. ... I have an upload button and a save button. ... which is bound to a GridView for previewing before ... protected void Upload_Click(object sender, EventArgs e) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Im about to commit matrimony (now with link)
    ... Keep tweaking the CV and upload new versions if the old ... with Wboserve yesterday, but their upload pages were borked. ... database and run several different filters against it. ... There's still an awful lot of COBOL code around and universities don't teach ...
    (uk.rec.sheds)