473,854 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.refresh link line with an error 3044.
(Description of that error is: 'C:\pc
experts\develop \IQOFF2007\Data base.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.Refresh Link
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: MSysComplexType VH_ 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 3170
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.com wrote in message
news:_v******** ***********@new ssvr29.news.pro digy.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.refresh link line with an error
3044. (Description of that error is: 'C:\pc
experts\develop \IQOFF2007\Data base.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.Refresh Link
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: MSysComplexType VH_ 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.com wrote:
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
4326
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 be better to promote better programming than rely on PHP to compensate for lazy programming?
4
6435
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 well as some color coding, etc. Having trouble finding the same in an editor that'll run on OS X. -- Floydian Slip(tm) - "Broadcasting from the dark side of the moon"
4
18550
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 blocks until something.exe terminates. Just what I /don't/ want. (Wouldn't an & be nice here! Sigh) I need something.exe to disconnect and run in the background while I
1
3707
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 sockets??
10
4233
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
4423
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 image, which will upload the record to a mySql db so users can then either view all profiles or query.. I.e. show all males in UK, all femails over 35 etc. Now, I'm not asking for How to do this but more what would be the best way? I've looked at...
1
3642
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 NOT IN ( SELECT manufacturers_id FROM products )
3
3496
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 the variable $GET but $GET is not a variable, I thought it came from the page that calls the PHP file? if(($_GET)==""){ this gets an error
2
106627
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 cyclery? Look no further! </P> <FORM NAME='frmJobApp' METHOD=post ACTION="jobapp_action.php"> Please enter your name:
1
13667
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
9899
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9750
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11023
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9509
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7909
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5738
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5936
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4147
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.