Hi,
Well you got me thinking now...
Afaik there are only 2 ways to change this...1) via the Link-manager 2) via
Code.
Ad 1)
the link manager is not installed pr default. Run the Office/Access
installation again and you should be able to installa this.
Ad 2)
1. Make a new module. (eg "module1")
2. Insert the following 2 functions:
Function CheckAttachedTable(strTable As String, strNewPath As String) As
Integer
' Checks the named table and attempts to reattach it if
' it's not attached properly.
'
' In:
' strTable - table to check
' strNewPath - path to connect to if test fails
' Out:
' Return Value - True if successful, False otherwise.
Dim db As Database
Dim rst As Recordset
Set db = DBEngine.Workspaces(0).Databases(0)
On Error Resume Next
Set rst = db.OpenRecordset(strTable, DB_OPEN_DYNASET)
' Check for failure. If the OpenRecordSet failed, then
' attempt to reattach the table.
If Err <> 0 Then
If Not ReAttachTable(strTable, strNewPath) Then
MsgBox "Could not reattach table '" & strTable & "'"
CheckAttachedTable = False
End If
Else
rst.Close
CheckAttachedTable = True
End If
On Error GoTo 0
End Function
Private Function ReAttachTable(strTable As String, strNewPath As String) As
Integer
' Reattaches the named table to the named path
' In:
' strTable - table to reattach
' strNewPath - path to attach to
' Out:
' Return value: True if successful, False otherwise
Dim db As Database
Dim tdf As TableDef
' Assume success.
ReAttachTable = True
Set db = DBEngine.Workspaces(0).Databases(0)
Set tdf = db.TableDefs(strTable)
' If Connect is blank, it's not an attached table
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strNewPath
' The RefreshLink might fail if the new path
' isn't OK. So trap errors inline.
On Error Resume Next
tdf.RefreshLink
ReAttachTable = (Err = 0)
On Error GoTo 0
End If
End Function
3. Call "CheckAttachedTable(strTable As String, strNewPath As String)"
somewhere...eg a new button in a form. something like this:
Dim testInt as Integer
testInt = CheckAttachedTable("linkedname", "c:\blabla\db2.mdb")
Well...If this doesnt help you im kinda lost....
Try searching the web for "access edit msysobjects" or something like
that...there should be lots of routines outthere to deal with this
issue...:)
I have read your original post again, and to be honest....the quick method
is to adress both databases/tables in ASP...I would do it that way....and
just ignore the last 5-6 postings here :)
You know that you use eg: "set conn=....." in ASP right? Then just make a
new connection at the same time to DB2....like this "set conn2=....."
?
/TH
"Dag Eriksen" <erjo-as@online.no> skrev i en meddelelse
news:G%OW9.17811$Rc7.252659@news2.e.nsc.no...
> Even with changing the parameters as you describe, I am not able to change
> the data.
> ("The control can not be edited. It is locked to replicationsystemcolumn
> "Database") ???
>
> Regards
>
> Dag
>
>
>
> "TH" <th@cogito.dk> skrev i melding
> news:3e2bb51a$0$121$edfadb0f@dtext02.news.tele.dk...
> > Hi,
> >
> > "Dag Eriksen" <erjo-as@online.no> skrev i en meddelelse
> > news:TeOW9.17805$Rc7.252522@news2.e.nsc.no...
> >
> > > So far so good, but trying to change it I got a message that this is
not
> > > allowed to change
> > > this parameter. Any more tips ??
> >
> > In the menu "options" you have a sub-menu called "security". There you
> will
> > find antoher sub-menu called "user and group permissions" or something
> like
> > that. There you can see that "administrator" needs read/write access to
> the
> > MSystemObjects-database.
> >
> > Dag: Make a copy of your Access database before altering this table :)
> >
> > /TH
> >
> >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (
http://www.grisoft.com).
> > Version: 6.0.443 / Virus Database: 248 - Release Date: 10-01-2003
> >
> >
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10-01-2003