472,801 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,801 software developers and data experts.

Re-linking problems if linked db no longer exists..Help!

ARC
I'm having trouble here with Access 2007 and connecting to a different
database.

The code below works great IF the previous back-end database connection is
still present and you are trying to connect to a new location (ie: datapath
variable below).

However, if you remove or even rename the old database, then launch your
program, the code fails on the mytable.refreshlink line with an error 3044.
(Description of that error is: 'C:\pc
experts\develop\IQOFF2007\Database.accdb' is not a valid path. Make sure
that the path name is spelled correctly and that you are connected to the
server on which the file resides.) This doesn't happen for all linked
tables, just a handful (possible corruption in MSysObjects table). Here's
the code I'm using:

If MyTable.Connect <";DATABASE=" & datapath Then
MyTable.Connect = ";DATABASE=" & datapath
MyTable.RefreshLink
End If

So this is not good. Basically I was trying to test an end-user running the
program (and they naturally wouldn't have my development folder and
database), so I renamed the dev. folder, and the .refreshlink fails on a
handful of tables. Apparently you don't even have to rename the folder, you
can simply rename the db that you were originally connected to.

Now here's the interesting bit. I can't even manually re-link the tables
that wouldn't re-attach through the linked table manager (if the original
database is no longer present). Looking in the MSysObjects table, I did a
search under the Database column for the db that is no longer present. It
appears that there are some corrupt lines that include a reference to the
old db in the Database column, however the Foreign Name column is something
like: MSysComplexTypeVH_ and then a bunch of numbers.

Another odd thing, it doesn't do this for all linked tables, just some of
them, but even one table not re-linking is enough to throw off my
re-attachment routine.

I did try creating a blank database, and re-importing all objects. This
removed the corrupt MSysObjects lines, but on first launch, the corruption
happens again during the reattach process, and some tables simply won't
re-attach.

Can anyone confirm this on Access 2007? If you have an app with re-linking
code at the start, all you have to do is rename the db that your connected
to, then launch your app and see if you have the same problem.

Thanks!

Andy
Sep 8 '07 #1
3 3078
ARC
After much testing, I think I've found the answer...

I Searched the database column in MSysObjects for anything starting with
"C:\", and then reviewed all the items in the name column. The 2 entries
with complex data seemed to indicate version history. That made me think
about testing the new access 2007 feature for version history on memo notes
fields.

I went back into my database, located the 2 memo fields, changed the Append
Only back to No, then created a blank database, and imported all the tables
and relationships from the back end db.

Then, I rebuilt my main program database, and searched MSysObjects again and
it came up clean.

Now the code below works perfectly when I reattach tables (if the old
attached db no longer exists).

So needless to say, do NOT use the new Append Only feature in 2007!!!!!
Chalk this up to the list of Acc2007 bugs. Does anyone have an easy "in" to
report this to microsoft?

Oh, another possible bug...Might relate to the append feature as well. If
you create a clean program file, the queries will get hosed if you don't
have the properly attached tables. You'll get things like: Expr1, Expr2,
Expr3 and so-on after it imports the queries.

Andy

"ARC" <an**@andyc.comwrote in message
news:_v*******************@newssvr29.news.prodigy. net...
I'm having trouble here with Access 2007 and connecting to a different
database.

The code below works great IF the previous back-end database connection is
still present and you are trying to connect to a new location (ie:
datapath variable below).

However, if you remove or even rename the old database, then launch your
program, the code fails on the mytable.refreshlink line with an error
3044. (Description of that error is: 'C:\pc
experts\develop\IQOFF2007\Database.accdb' is not a valid path. Make sure
that the path name is spelled correctly and that you are connected to the
server on which the file resides.) This doesn't happen for all linked
tables, just a handful (possible corruption in MSysObjects table). Here's
the code I'm using:

If MyTable.Connect <";DATABASE=" & datapath Then
MyTable.Connect = ";DATABASE=" & datapath
MyTable.RefreshLink
End If

So this is not good. Basically I was trying to test an end-user running
the program (and they naturally wouldn't have my development folder and
database), so I renamed the dev. folder, and the .refreshlink fails on a
handful of tables. Apparently you don't even have to rename the folder,
you can simply rename the db that you were originally connected to.

Now here's the interesting bit. I can't even manually re-link the tables
that wouldn't re-attach through the linked table manager (if the original
database is no longer present). Looking in the MSysObjects table, I did a
search under the Database column for the db that is no longer present. It
appears that there are some corrupt lines that include a reference to the
old db in the Database column, however the Foreign Name column is
something like: MSysComplexTypeVH_ and then a bunch of numbers.

Another odd thing, it doesn't do this for all linked tables, just some of
them, but even one table not re-linking is enough to throw off my
re-attachment routine.

I did try creating a blank database, and re-importing all objects. This
removed the corrupt MSysObjects lines, but on first launch, the corruption
happens again during the reattach process, and some tables simply won't
re-attach.

Can anyone confirm this on Access 2007? If you have an app with re-linking
code at the start, all you have to do is rename the db that your connected
to, then launch your app and see if you have the same problem.

Thanks!

Andy

Sep 8 '07 #2
On Sep 9, 5:13 am, "ARC" <a...@andyc.comwrote:
So needless to say, do NOT use the new Append Only feature in 2007!!!!!
Chalk this up to the list of Acc2007 bugs. Does anyone have an easy "in" to
report this to microsoft?
Um, I got a bit lost in your discussion of the two issues. Please only
on the Append Only feature of memo fields, tell us again what is the
bug?

Thanks

Ananda

Sep 9 '07 #3
Thanks Andy. I've magpied the idea away.

Ananda

Sep 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would...
4
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as...
4
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function...
1
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with...
10
by: James | last post by:
What is the best method for creating a Web Page that uses both PHP and HTML ? <HTML> BLA BLA BLA BLA BLA
8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
1
by: joost | last post by:
Hello, I'm kind of new to mySQL but more used to Sybase/PHP What is illegal about this query or can i not use combined query's in mySQL? DELETE FROM manufacturers WHERE manufacturers_id ...
3
by: presspley | last post by:
I have bought the book on advanced dreamweaver and PHP recently. I have installed MySQL and PHP server but am getting an error on the $GET statement show below. It says there is a problem with...
2
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of...
1
by: Brian | last post by:
I have an array like this: $events = array( array( '2003-07-01', 'Event Title 1', '1' //ID Number (not unique) ), array( '2003-07-02',
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.