accessing old database (.db) - possibly ColdFusion - coldfusion

I have inherited old data which apparently was created with ColdFusion. I have never used ColdFusion and I simply have a file with the extension .db
Basically I need to access the data (which is simply records of animals in a herd and related information). I just want to get to the data and pull it off into excel. I have an idea of what the data will look like since more recent years of data were created in an Access database.
Any ideas on the easiest way to do this?

Related

How to store nested lists as Django model field (or should I keep data as flat files)?

I'm working on a basic django web app (as a novice) that amalgamates several sources into nested lists representing flat 2d tables of data. This are then updated/displayed/referenced accordingly.
My current setup, which works ok, is for these data files to exist as very small csv files which are read/written as needed. They are also picked up using d3.js which has been easier given the d3 templates tend to import from a static data file.
It feels incorrect to not be querying the database directly for all of this data - is there an issue with using flat csv files?
If I should be querying the database, how best to store/access nested list data within Django? I can't find much but have seen some vague references to Serializers?
Since you read/write you should store data in your database. You can create a model which corresponds to your csv. A nested list can be stored as a simple string (or alternatively, if you need to query the list directly you can create another model which will hold the values - but that's rather inefficient). As for importing/outputting csv with models, you can do that with a script of your own or use a library like django-adaptors. Oh, and as far as I am aware of D3.js accepts JSON which is more flexible and better supported in Django.

Handling fields of Attachment type in MS Access using ADO

I have some fields in my database that will need to store images ( bitmap, JPG or PNG ) and PDF ( or Excel/RTF/TXT ) files. Browsing through Internet, I have learned that MS Access 2007 ( and newer versions ) have a field of type Attachment that can suit my needs.
However, I am filling database via GUI ( made in C++ and WinAPI ), using ADO. I was not able to find an example of inserting/loading such data into/from database using ADO. Searching here through some similar questions ( VB, Delphi, Python...) I have found out that my approach might not be the best, but seems possible to do.
Being inexperienced, and since this is my first time tackling this type of task, I ask community to help me solve this task. Therefore my question:
How should I handle inserting/loading this type of data ( images, documents...) into/from MS Access 2007 (or higher) database using ADO?
Can you provide small code snippet that illustrates inserting/loading such data into/from database using ADO?
Thank you.
If you are planning to only use the C++ application as the front-end and do not expect users to be opening the database in Access itself then I suggest that you avoid using the Attachment field type. Instead, use a separate child table named [Attachments] with a one-to-many Relationship (foreign key constraint) between the [Attachments] table and the parent table (where you were considering using the Attachment field). Then, save the documents as raw binary data in an OLE Object (long binary) field in the child table.
The Attachment field type offers several advantages for applications that use the Access UI. Support for multiple attachments to a single database record can be as simple as dropping an Attachment control onto an Access form. Attachments can also be accessed from Datasheet view, although all you see there is a "paper clip" icon.
Attachment fields can be manipulated from code, but only by using an ACE DAO Recordset2 object (example here). In order to be able to save multiple attachments per record, the Access Database Engine uses a hidden child table. It is possible to pull some information into a SELECT query using "magic" field name qualifiers (e.g., Field1.FileName) but neither ADO nor ODBC can INSERT or UPDATE Attachment field entries.
Since you will not be using the Access UI for your application
you will not be able to use many of the advantages that an Attachment field has to offer, and
you could still manipulate the Attachment field via ACE DAO from your C++ app, but it would be a nuisance.
The one (possibly) significant advantage that you might miss by not using an Attachment field is that the Access Database Engine automatically compresses files in an Attachment field but raw binary data in an OLE Object field is stored uncompressed. If the files you intend to save were all in compressed formats anyway (e.g., JPEG, .docx, .xlsx) then this would not be an issue. However, if you plan to store a lot of large documents in uncompressed formats (e.g., .txt, .rtf) then file bloat could be a problem. In that case you could have your C++ app automatically compress those documents (perhaps using GZipStream) before saving them and uncompress them on retrieval.

Avoid report to allow modifications of records in Filemaker Pro 11

I'm building a database that needs to display tables as lists and allow the user to export such lists as Excel spreadsheets.
Creating the reports, showing them as lists and providing the button for exporting as Excel was not a problem, however I noticed that when I show those lists the user can still edit them, hence add/deleting records and modify the content of existing records.
I'd like to find a way to avoid such modifications when visualizing the list, in such a way to be sure the user does not accidentally change data.
Any idea as to how to do this? I'm using Filemaker pro 11
Thanks in advance.
There are a couple of different ways that might be appropriate, depending on your needs:
In layout mode, click on the field, go to the Data tab of the Inspector, and turn off field entry in 'Browse' mode. (You also have the option to turn off field entry in 'Find' mode. And you can select multiple fields at once to make the selection for all of them.) This is appropriate if your users can regularly enter data into these fields but you don't want them to enter data for this particular layout.
In Manage Database, under the field options, turn on Prohibit modification of value during data entry in the Auto-Enter tab. This is appropriate if you will only be changing the value of a field during an import or with a script.
In Manage Security, create a new Privilege Set that is View-Only for that table (or for those fields). This is appropriate when some users should be able to modify the data and other users should not be able to modify the data.
There are other methods, as well, but those are the three most common for limiting user access to data.

PL/SQL Access to Saved Report Data

Using 4.1 (latest version).
I have an Interactive Report page in my app. Users are free to create and save public and private reports setting any filter conditions they choose. What I need to do is loop through these reports and "process" some data based on a column value that matches the filter condition (something like an EMPLOYEE_ID).
What I would like to do is package this functionality into a PL/SQL procedure that is scheduled using DBMS_SCHEDULER.
Other than trying to reverse engineer this from the APEX views, I am stuck. Any help is greatly appreciated.
The bad news: there is no built-in way to get the query of an interactive report.
(I hope you can program PLSQL, otherwise you've hit a dead end.)
However, i have a package which does most of the work and is indeed processing the application metadata for IRs. It can handle both column and row filters, and also columns which have an lov laid on top of them. It doesn't handle computations or aggregates.
You'd have to take the code and adjust it somewhat though, as my goal was returning some data through json back to the browser, but you won't have to write the query-rebuilding part anymore. I'll refer you to my blog post i made about my package and why i made it, so that might clear up some of the usage of it for you. You can get the zip, and you'll need the APEX_IR package. (at time of writing, it still contains a stupid oversight in that it ignores the dis/enabled state of filters)

How do you save data in MFC?

I still remember in Delphi, developer can just make the UI(textbox, listbox...) directly connect to database, and then when user click a button, just call the post action, then the data will be saved automatically.
What I want to know is that is there any similar mechanism in MFC? Or I can use GetDlgItem(...).Text and then use this value to save to database ?
Or any other suggestions will be appreciated.
In VC++ , you have to use Microsoft ActiveX Data Object Library (ADO typelib) .
To store data you can follow these steps:
1.Retrive data from all controls
2.Validate the data retrived
3.Use sql query to store the data to database.
You can use ODBC API which is independent of any database management system.
http://msdn.microsoft.com/en-us/library/ms714562(VS.85).aspx
http://www.odbc.net/api/index.shtml
To be fair on Delphi these are specialized widgets, not the ordinary GDI textbox etc, but controls with an additional database aware layer that are connected to dataset and tables.
.NET has something similar concepts too, don't know about MFC
MFC's abstraction of data in Doc/View/Frame is in CDocument. When you save the document, MFC prompts the user for the file name if the file does not have a saved path, then construct a CArchive on the file and triggers CDocument::Serialize. You can store the connection string in your document class and use it to save data in CDocument::Serialize.
If you have a file based database, it is easier to integrate. Override CDocument::OnNewDocument to create a new file based database for the document, and
override CDocument::OnOpenDocument to read from existing database. If you don't have a file based database, you can suppress the file dialog with a CDocument::SaveModified override that saves the data and clears the modified flag.