473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Regarding saving database objects as text files and importing them...

MLH
GHudson has working procedures posted at
http://www.access-programmers.co.uk/...ad.php?t=66320
They work. Relationships, however, and some minor default settings are
not preserved. Reestablishing some default settings and settings is a
small price to pay for a set of text files that may save your database
from total loss #AND# seem to remove the database bloat as well.

I was wondering if someone knew how to preserve the relationships
as text files so they wouldn't have to be rebuilt from scratch after
importing tables.
Nov 13 '05 #1
14 1856
One alternative, and this is something of a roundabout method, would be to
create a table for the properties of the DAO Relation object, and then loop
through each Relation in the Relations collection, saving the properties as
a record in the table. You could then export the table to text as any other
table. Upon re-importing this table, you could use this table to recreate
each relation using the CreateRelation method. If you notice, the
properties of the Relation object and parameters of the CreateRelation
method match up.

I have not tested this approach. I am merely offering it up as one approach
you may want to consider.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"MLH" <CR**@NorthState.net> wrote in message
news:lc********************************@4ax.com...
GHudson has working procedures posted at
http://www.access-programmers.co.uk/...ad.php?t=66320
They work. Relationships, however, and some minor default settings are
not preserved. Reestablishing some default settings and settings is a
small price to pay for a set of text files that may save your database
from total loss #AND# seem to remove the database bloat as well.

I was wondering if someone knew how to preserve the relationships
as text files so they wouldn't have to be rebuilt from scratch after
importing tables.
Nov 13 '05 #2
MLH
Its definitely something I had not thought of. Others in this
NG have commented that they would like to see a 100%
database build from text. It has been suggested that such
would make for an excellent Add-In for Microsoft Access.

This much, I know - and that is, I would pay for it if it were
available. For certain.
Nov 13 '05 #3
Have you tried exporting the MSysRelationships table and importing it
to restore the relationships? I have no idea if it will work or if it
will let you, but worth a try. Turn on View | System Objects in Options
to see the system tables.

Nov 13 '05 #4
"watto" <wa******@gmail.com> wrote in
news:11**********************@g44g2000cwa.googlegr oups.com:
Have you tried exporting the MSysRelationships table and importing
it to restore the relationships? I have no idea if it will work or
if it will let you, but worth a try. Turn on View | System Objects
in Options to see the system tables.


It won't work. It's owned by the DB engine, and you don't have any
permissions on it at all -- you can't replace it or delete or append
records to it. You'd just end up with a second table with a
different name that is useless.

That's the case with most of the system tables.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
You could try something like:
Debug.Print
CurrentProject.Connection.OpenSchema(adSchemaForei gnKeys).GetString(adClipString,
, vbTab, vbNewLine)

Nov 13 '05 #6
There are many of these floating around news groups.
Of course we get an pristine, tiny as possible copy of the tables and
relationships, with
SaveAsText, 6, "", NewFilePathName
and it's quite simple to loop through the other objects and save them
as text, and to recover them as well.

I wrote and posted one of these several years ago and I believe one is
avaiable in the downloads section of my site (FFDBA.com).

The only challenge TTBOMK is the References which must be kludged a
bit.

Now it's true that the teables are not saved as text, but they are
saved without any other crud, and they are saved about as small as they
can be saved.
If this isn't good enough, and I see no reason it isn't, then using the
ADO recordset Save Procedure will do that.

I've figured out why you annoy me. It's because you base your questions
and comments on assumptions which are not true, but which you imply are
self-evident, or universally accepted. Mostly they are S__t!

Nov 13 '05 #7
rkc
lylefair wrote:
I've figured out why you annoy me. It's because you base your questions
and comments on assumptions which are not true, but which you imply are
self-evident, or universally accepted. Mostly they are S__t!


I figured out why you amuse me a long time ago.
Nov 13 '05 #8
rkc wrote:
lylefair wrote:
I've figured out why you annoy me. It's because you base your questions
and comments on assumptions which are not true, but which you imply are
self-evident, or universally accepted. Mostly they are S__t!


I figured out why you amuse me a long time ago.


Enjoy!
Nov 13 '05 #9
rkc
Lyle Fairfield wrote:
rkc wrote:
lylefair wrote:
I've figured out why you annoy me. It's because you base your questions
and comments on assumptions which are not true, but which you imply are
self-evident, or universally accepted. Mostly they are S__t!

I figured out why you amuse me a long time ago.

Enjoy!


I do.
Nov 13 '05 #10
"lylefair" <ly***********@aim.com> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
There are many of these floating around news groups.
Of course we get an pristine, tiny as possible copy of the tables
and relationships, with
SaveAsText, 6, "", NewFilePathName
But that only works when run from the MDB in which the tables are
stored. Believe me, I tried to make it back up a back end MDB from
the front end, and I never could make it work.
and it's quite simple to loop through the other objects and save
them as text, and to recover them as well.


If you're unsplit, then, yes, your suggestion works. In the normal
split Access app, I've never found a way to backup the data with
SaveAsText

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #11
MLH
I'm working in A97.
xxxxxxxxxxxxxxxxxxxxxxxxxx
You could try something like:
Debug.Print
CurrentProject.Connection.OpenSchema(adSchemaFore ignKeys).GetString(adClipString,
, vbTab, vbNewLine)


Nov 13 '05 #12
MLH
Here's an assumption that may or may not be true, but you may infer
that I'm implying it is: You infer <> I imply
I've figured out why you annoy me. It's because you base your questions
and comments on assumptions which are not true, but which you imply are
self-evident, or universally accepted. Mostly they are S__t!


Nov 13 '05 #13
MLH
S__t!??? What are you implying with S__t!?
Salt? Spit? Snot? What? I think I know what
you are implying but you can see its easy to infer
otherwise. I don't think I've ever stated outright
on this forum that anything is self-evident, or
universally accepted. Knowing this, maybe
my future posts won't annoy you as much. I certainly
appreciate your answers and your help when you
give it. For the most part, I ask questions when I need
the answers. Sometimes I ask about things that really
don't matter much - just out of curiousity. But most of
my questions are a means to an end that is of some
importance to me.
I've figured out why you annoy me. It's because you base your questions
and comments on assumptions which are not true, but which you imply are
self-evident, or universally accepted. Mostly they are S__t!


Nov 13 '05 #14
yeah.. there is a solution for that.

1) use access data projects - script out anything you need via SQL
Server.
2) visual source safe has an add-in that will export forms, reports to
txt files.

MDB is a waste of resources.

Nov 13 '05 #15

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

Similar topics

3
by: Ponder | last post by:
Okay here's the scenario: I have two big lists of numbers. One number on each line (they're telephone numbers if that helps.) What I want to do, is have VB search through list2.txt for numbers...
4
by: atse | last post by:
Hi, I still have problem to import the text file delimited by tabs or commas into the database. I refer to http://www.connectionstrings.com/ for the connection, ODBC doesn't work and OLD DB...
1
by: David Winter | last post by:
(Sorry - couldn't find a generic DocBook NG - I hope this is close enough.) I'm considering moving my documentation and translation business - which is currently done in proprietary formats such...
2
by: steve | last post by:
Hello, I am trying to import an image file into a form. This would be a persons picture saved in the same directory for every unique record. I don't have any problems making an action button to...
4
by: Brian K. | last post by:
I am trying to split up and secure a database that we've been using on a network for a few years, following the procedure listed in Q304932 from microsoft. I create a new blank database for...
3
by: Julia | last post by:
Thanks for all you responses assuming I have a collection of objects which I want to save in a database I wonder if the following is the way to deal with a situation that only some of the...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
2
by: conspiracy cam | last post by:
Hi. Trying to create a program which splits up a large amount of text into small pieces, puts these pieces into a database, allowing for later reuse. The problem is since each text file is a...
3
by: pozze | last post by:
Hi, I've just made the change from ASP to .net. I have a file (code below) that saves a user submitted file to a MS SQL 2005 database. It collects the file name, file size, file type, and lastly...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.