Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-12-2019, 10:15 AM   #16
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,656
Thanks: 58
Thanked 1,463 Times in 1,444 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Import/Export Data Tasks

Hi Colin. Great job! Thanks!

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 11-12-2019, 12:04 PM   #17
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,564
Thanks: 443
Thanked 847 Times in 818 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: View & Edit IMEX Data Task Specifications

Colin,
How does one remove the line numbers please?


EDIT by Isladogs.
I've moved this and subsequent posts from the code repository thread https://www.access-programmers.co.uk...d.php?t=307897 to make it easier for members to reply without the need for moderation
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 11-14-2019 at 01:58 AM.
Gasman is offline   Reply With Quote
Old 11-12-2019, 02:50 PM   #18
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,382
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: View & Edit IMEX Data Task Specifications

Very easily if you have MZ-Tools which is how I added them
Otherwise you can do so manually. Not sure of any VBA code to do so
Line numbering is helpful in bug fixing during development.
However why does it matter if line numbering exists?

BTW as I know you run A2007, I believe that the old system table method applies rather than the newer data tasks. Can you correct me if I'm wrong about that

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 11-12-2019, 10:02 PM   #19
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,564
Thanks: 443
Thanked 847 Times in 818 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: View & Edit IMEX Data Task Specifications

Hi Colin,
Not to worry, I found this site http://remove-line-numbers.ruurtjan.com/ which did the job admirably.

Yes, I have those tables and can recognise some linkages between them.
However that code to expose the XML also works for me.
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 11-12-2019, 10:56 PM   #20
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,382
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: View & Edit IMEX Data Task Specifications

Glad you have a solution for line numbers though still not clear why it matters.
However just to clarify, in A2007, am I correct that the old system applies where import/export specs are saved to the two MSysIMEX tables
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 11-12-2019, 11:16 PM   #21
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,564
Thanks: 443
Thanked 847 Times in 818 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: View & Edit IMEX Data Task Specifications

Quote:
Originally Posted by isladogs View Post
Glad you have a solution for line numbers though still not clear why it matters.
However just to clarify, in A2007, am I correct that the old system applies where import/export specs are saved to the two MSysIMEX tables
Yes, entries are in there. I have a few specs I use in my SSAFA DB.
I used your code to populate your Usys table and reviewed the result which looks good.

I do not use specs that much, but no doubt it will come in handy in the future.

Personal preference on the line numbers, mainly as they are not required.?

Thanks again.
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by Gasman; 11-13-2019 at 01:56 AM.
Gasman is offline   Reply With Quote
Old 11-12-2019, 11:42 PM   #22
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,382
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Import/Export Data Tasks

Quote:
Originally Posted by Pat Hartman View Post
I'm going to have to disagree with that assessment. They are one of those "improvements" are are designed to shelter people from details. If you can't get to the details, you can't change anything including the source file name or location. You also can't use the same spec for multiple imports as you can with the earlier method. I have a process that both imports and exports the same file type and I use the same spec whether I am importing or exporting. The new, "improved" method can't do that. At my last client, I had to convert from the new to the old at least a dozen times for different people. They frequently made little databases that they shared among themselves. However, what would run on one person's PC wouldn't run on another's since the file paths were never the same. So I had to change all the import/export actions to use TransferText or TransferSpreadsheet so the source/target could be controlled by the user.
Hi Pat
Only just noticed your post. Whilst I agree with much of what you've written, for end users the new data tasks are much easier to work with. The problems are indeed the lack of transparency and inability to edit the tasks.
However, I suggest you look at my new item in the code repository, I've provided code which allows you to view and edit the XML in the new data tasks. See https://www.access-programmers.co.uk...d.php?t=307897

Perfect for when an app is distributed and the external files are located in a different place.

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 11-13-2019, 09:12 PM   #23
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,316
Thanks: 15
Thanked 1,601 Times in 1,520 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: View & Edit IMEX Data Task Specifications

Good job as usual Colin but I probably wouldn't make this procedure accessible to the user. Whenever you need to make changes to the import/export spec, they should be made to the master copy of the FE. Otherwise, changes made to a user FE will be lost when a new version of the FE is released.

For applications used by others, I prefer the old style method that uses TransferText. It is quite easy to provide an interface that substitutes a custom file name without making any change to the spec itself. In fact, most of my exports use custom file names. Some part is fixed and then date and/or some additional information is concatenated so that each export file name is different and doesn't overlay earlier exports unless you export the same data for the same time period. So exporting the transaction data for customerX for October 2019 would always generate the same file name and newer versions should overlay older versions. Imports may or may not be consistent since typically they are created by applications outside of our control. I have some where the filename is always the same and others where the filename includes data such as a bank account number and a statement date.
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Old 11-14-2019, 12:31 AM   #24
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,382
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: View & Edit IMEX Data Task Specifications

I wasn't suggesting making the code accessible to the standard user either.

As for the other points, do remember that data tasks largely replaced the old method in A2007. Whilst the old import / export specifications will still run in newer versions, you cannot create 'traditional' IMEX specs for e.g. Excel files and save them to the two legacy MSys tables.

CORRECTION (15 Nov 2019):
You can still create IMEX specs for importing TEXT files in more recent versions of Access but not for Excel files/Access tables
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)

Last edited by isladogs; 11-15-2019 at 03:23 AM. Reason: Correction - newer data tasks from A2007 onwards
isladogs is offline   Reply With Quote
Old 11-14-2019, 02:22 PM   #25
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,382
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Import/Export Data Tasks

I've just updated the example app as follows:
a) added code to allow data tasks to be deleted
b) changed the app so all functions can now be run using a form
c) added a report to view details of all new style saved data tasks (A2007 or later)
d) added another report to view details of any 'traditional' IMEX specifications saved in the 2 MSys tables

The purpose of the form is so that it can be used by program admins as appropriate to modify saved data tasks when an application is deployed.
The form/code should never be accessible to standard users.
Using a form also means that this can be used with ACCDE files.

The new version has now been added to the code repository
https://www.access-programmers.co.uk...d.php?t=307897
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)

Last edited by isladogs; 11-15-2019 at 03:19 AM. Reason: Correction - newer data tasks from A2007 onwards
isladogs is offline   Reply With Quote
Old 11-14-2019, 08:52 PM   #26
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,316
Thanks: 15
Thanked 1,601 Times in 1,520 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: Import/Export Data Tasks

Quote:
you cannot create new IMEX specs and save them to the two legacy MSys tables. In fact the MSys tables are no longer created by default.
I don't have any trouble in A2016. I never use the new methods because I believe them to be less useful. These tables were never created by default. They are only created if you actually save a spec.
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Old 11-15-2019, 03:18 AM   #27
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,382
Thanks: 115
Thanked 3,114 Times in 2,831 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Import/Export Data Tasks

Pat
I understand totally why you prefer the old 'traditional' IMEX specification method which was I believe introduced in A2003.

In fact the 2 MSys tables are created automatically in newer versions when you first run an import/export whether or not you save it as an IMEX specification.

However, whilst you can certainly use any existing IMEX spec saved in the 2 MSys tables in A2007 or later, the ability to create a new 'traditional' IMEX spec is limited.

You can still do so for TEXT files by clicking the Advanced button then Save As ... on the Specification window.

However if you import Excel files or tables from another database the Advanced option does NOT appear. Therefore AFAIK, you cannot therefore save it as an OLD style IMEX specification. If you need to save it, you have to use the newer data tasks whether you like them or not.

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)

Last edited by isladogs; 11-15-2019 at 03:53 AM.
isladogs is offline   Reply With Quote
Reply

Tags
import export data tasks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import and export data wgma General 4 02-13-2009 12:29 PM
Import/Link Outlook Tasks into Access airforceruss Modules & VBA 2 02-13-2008 10:02 AM
[SOLVED] Import/Export data only DJN General 3 11-17-2004 07:36 AM
Export / import data le888 Forms 6 06-11-2004 04:51 AM
Can you import Tasks from Outlook into an Access Form? Vaso022578 Modules & VBA 1 09-14-2000 08:54 AM




All times are GMT -8. The time now is 02:09 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World