?
Solved

Writing a text file from Database data

Posted on 2005-03-23
6
Medium Priority
?
286 Views
Last Modified: 2010-04-17
At the moment I have a 3 very simple tables - 'survey', 'value', and 'variable' that each follow the same structure of having 2 columns - 'Name' and 'Format'

The Variable table appears as below:

'Name'          Format
custom3        EMPTY
custom34      EMPTY
custom345    EMPTY


What I would like to do is that when any record is added or deleted from this database that a text file with the structure below is created.

<!ELEMENT custom3 EMPTY>
<!ELEMENT custom34 EMPTY>
<!ELEMENT custom345 EMPTY>

<!ENTITY % UDvariable_controls "custom3 | custom34 | custom345 ">

If possible I would also like to be able to have this saved with a '.dtd' extension rather than a '.txt' one. Any help will be greatly appreciated as I have got no-where with this.

Thanks
0
Comment
Question by:Rob62
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 5

Expert Comment

by:beryl666
ID: 13610030
what language are u using?
0
 

Author Comment

by:Rob62
ID: 13610069
Well if it could be done in VBA it would be good. Can use VB.Net though
0
 
LVL 23

Accepted Solution

by:
gecko_au2003 earned 2000 total points
ID: 13610744
You would need to figure out how you add or delete the data from the table so you could do an if statement to check if the data has been added or deleted then from there use the FSO (File System Object ) which you add a reference to Microsoft Scripting Runtime by going to tools - > references and scrolling down and checking that option.

Then from there you can go to this site :

www.juicystudio.com 

search for FSO and open the vb one, it will show you how to write to a text file. You could use concatention to rename the file type when you save the text file.
0
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13610749
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question