i have a file with documents.
i wrote a applikation with asp.net.
i need to read the creation date and the date of the last change (and title, etc.)
for that i used the API filesysteminfo.
in the file are documents, that are a copy of a vss server.
but when a document is copied, the date of creation changes to the "date of copy".
but i need the original date of creation.
any idea?
greetings
If the file has been overwritten, you will not be able to get the creation date that is stored in SourceSafe.
You may have more luck using the SourceSafe API, however this uses OLE automation, so may not be very simple.
i solved the problem with robocopy
robocopy source destination [parameter]
default it copies Data, Attributes and Timestamp
http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx
http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displayLang=en
Related
I am asked to automate the tracking of changes in the structure of the database: Any modification, addition or removal of tables, fields, indexes, etc.
I have searched the audit but only found that it can track changes in the "Database schema", which is something else.
Do you know if it is possible to do that?
We use 11.6.3.
One wonders how those magical changes in the schema (I think you clarified that it was actually schema changes you wanted to automate) occur. Optionally it could be up to those making the changes to also keep track of them. Usually (hopefully) the database is updated using "delta df-files". Those df-files if kept are a changelog of the database.
Another option is to daily/hourly/weekly dump the data definitions:
CREATE ALIAS DICTDB FOR DATABASE sports.
DISPLAY LDBNAME("DICTDB").
RUN prodict/dump_df.p ("ALL",
"c:/temp/sports.df",
"").
DELETE ALIAS DICTDB. /* Optional */
Taken from this entry in the knowledge base: https://community.progress.com/s/article/15884
Then you can diff that df-file using your favorite tool or keep as it is.
If you actually mean structure (that's more how the data is stored in different files on disc) you can use the prostrct command to save a new st-file to disc:
prostrct list sports
This will save a file called sports.st. Handle it as above and you will have a changelog of the database structure.
Somehow in my firebase account 2 sets of data have changed the fieldname for 'DeviceID' to 'PeripheralID' and 'DeviceUUID'. Is there a way that I can search these and change them to be 'DeviceID'? I would prefer to do this by command line but will do whatever is easier.
Im thinking something along the line of firebase update:database ?
To answer the question with comments under question:
There is no tool for it. You'll have to download the data from database, edit JSON with some kind of text editor and upload it back to database.
This operation OVERRIDES information in database with information in JSON. In other words: uploading JSON changes database.
If you're using firebase console and data you want to change is not in whole database, you could open certain tree level and do those operation just there.
I need some help. We migrated an Access database to SQL Server. One column had attachment data the Attachment data type in MS Access. The MS Access application is being replaces by an ASP.NET web application.
This data now lives in a column of data type varbinary(MAX), there is no indication of the file name and or type (most attachments are Excel, Word and PDF docs).
In my ASP.Net application I am using a data reader that will allow users to retrieve the attachments by downloading them using a browser. (I have a new table for new attachments that contains the full file name and content type, and when present it works like a charm). Without the file types, all attachments come across as xml/garbles data files like shown in this image below (can't yet post images, been a long time reader, first contribution. Here is the text in which I had planned to highlight some key values:
ÿÿÿÿWorksheetExcel.Sheet.12****Access.OLE2Link¾ÐÏࡱá>þÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿ]þÿÿÿþÿÿÿ !"#$%&'()*+,-./0123456789:;<=>?#ABCDEFGHIJKLMNOPQRSTUVWXYZ[\þÿÿÿþÿÿÿÿÿRoot EntryÿÿÿÿÿÿÿÿàÆ©÷òï…ÝŒkˆZ‚Å7Ï€Ole ÿÿÿÿÿÿÿÿÿÿÿÿCompObjÿÿÿÿeOlePres000ÿÿÿÿÿÿÿÿš þÿÿÿþÿÿÿþÿÿ‹ÀF CENTRA~1.XLSÿÿÞHBCentral Dispatch Process Map.xlsxºÀF'C:\Users\MA~1\Desktop\CENTRA~1.XLSÿÿÞ]|C:\Users\ine\Desktop\Central Dispatch Process Map.xlsxÕLÀFƒ •Æh5)ÏBy>*Ϧc{>*ÏS5ŽŒ2S5&D%¯ CENTRA~1.XLSpï¾&D6®&D%¯*ƒœ2Central Dispatch Process Map.xlsxm-lkÑÊC:\Users\ine\Desktop\Central Dispatch Process Map.xlsx(
It appears that the content is there from which I should be able to extract the file name and types.
Here is my question, how do I migrate my attached files. I need to determine the content type and file names from the original data stored in varbinary(max), I then need to move the files from the current location into my new table with the attributes that describes the file name and file type.
Thanks
How can I get author name and last updated date of the documents uploaded in Marklogic Server ?
Unless you've turned off the maintenance of the last-modified property, you can find it on the document's property fragment (you can browse these via Explore mode in query console).
In the future, last-modified maintenance may be off by default, fyi.
I'm not aware of any notion of user account associated with the last modification that is maintained. You'd need to add and maintain that metadata yourself via a trigger or CPF or some other mechanism.
I need a place to store images. My first thought was to use the database, but many seems to recommend using the filesystem. This seems to fit my case, but how do I implement it?
The filenames need to be unique, how to do that. Should I use a guid?
How to retrieve the files, should I go directly to the database using the filename, make a aspx page and passing either filename or primary key as a querystring and then read the file.
What about client side caching, is that enabled when using a page like image.aspx?id=123 ?
How do I delete the files, when the associated record is deleted?
I guess there are many other things that I still haven't thought about.
Links, samples and guidelines are very welcome!
Uploading Files in ASP.NET 2.0
You seem up in the air about how to do this, so I'll give you a few ideas to get you going.
If you want to use a file system make sure you know the limit of how many files are permitted per directory, so you can set up a system that creates subdirectories. http://ask-leo.com/is_there_a_limit_to_what_a_single_folder_or_directory_can_hold.html
I would make a table something like this :
FileUpload
UploadID int identity/auto generate PK, used as FK in other tables
InternalFileName string
DisplayFileName string
Comment string
MimeType string
FileSizeBytes int
FileHash string MD5 Hash of a File
UploadUserID int FK to UserID
UploadDate date
You would include the UploadID in the table that "owns" this upload, like the Order associated with it, etc. You could add the InternalDirectory column, but I prefer to calculate this based on a constant Root value + some key specific value. For example, the complete file name and directory would be:
Constant_Root+'\'+OrderID+'\'+InternalFileName
You could make the InternalFileName be the UploadID and the file extension from the original file. That way it would be unique, but You'll have to insert the row as the first part of the process, and update it after after you know the file name and identity/auto generate row value. You could make the InternalFileName something like YYYMMDDhhmissmmm and the file extension from the original file, which may be unique enough based on how you use subdirectories.
I like to store a MD5 Hash of a File which makes detecting duplicates easy.
MimeType and FileSizeBytes can be found from the file system, but if you store them in the database, it makes some maintenance easier since you can query for large files or files of certain types.