what format is most reliable for saving a history file from an application? - vb.net

Good Afternoon,
I am in the process of developing in vb.net a simple “cheque printing” application which will allow users to fill in a few text boxes with the values that will be printed on a cheque.
When they hit the print button, the values will be sent to the printer, but I also want the values they input in the text boxes saved to a file, so like a history file of all the cheques that were created.
I am thinking to use either an access database or an excel spreadsheet as my history file, but I am not quite sure on which would be best.
Please note that in my environment storing this information in a SQL database is not an option and also this file will most likely be stored/accessed from the network.
The history file needs to be:
1.Stable (cannot corrupt easy)
2.Reliable
3.Easily exportable in case we need to export the information to one of our in-house systems.
4.editable from the application I am developing
Kindly advise,
A

XML. Save the data to DataTable object and then use the .WriteXML method to save it as an xml file. I'd advise creating a strongly-typed DataTable class for this, so that the XML can be exported with a reliable schema and imported easily.

If you are using different fonts, you could use a .rtf (rich text format) which will save the format of the text that you send to print... it is a universal file format, you can open it with open office, ms office, or any office suite you have...

Access will be best choice,
it's relational database and can make a form from this file to do what are you looking for without VB or any code.
Also you can access this file from network.
for more detail about setting for this file go to this link
http://goo.gl/bOfGp6
and you will find more options complete your work.

I would use a MySQL server. It's free.
XML is also good, but I hate sharing folders...

Related

Coding to print PDF files from file paths in query results

I'm not new to Access, but am very new to VBA coding. Our management software is horrible, but it's the best that is available in the industry and I have created many many reports using Access, but have new problem now.
Attachments in the system are stored in one central location and then the file name stored in a SQL table. I have created queries to pull the full file path including the file name. Would it be possible to use some VBA coding to print all the existing PDFs in sequence from the paths returned in the query?
Thank you for any and all help!
Native VBA controls the collections of methods and attributes from Office.
An existent PDF is not the case (Access can create one or open, but not open and print).
To open a file with full path you will need to perform a select from table and perform a loop to shell open file, after that, sendkeys ^P.
But I strongly recomend to use another tool to do it, like Auto Hotkey or AutoIt.

saving data from an online table/CSV to sql database

I am looking into creating an sql database that extracts data from a web page. The webpage displays the data in either a table or CSV list.
The address of the page is
Online table/CSV
I am not entirely sure how to do this. I thought maybe to save the page as a text file then import it but I cannot save it. Am I missing something is there an easy way of doing this?
Apologies I should say that I will use the data in a asp.net application using VB in Visual Studio 2010. The SQL will will be SQL Server 2012.
EDIT - ok so I was informed to run the page in compatibility mode and the CSV will save which I have confirmed. I therefore need to be able to open the page using a vb console app and perform a save as. I have tried using the webclient control and I can create a file but it downloads the html of the page as well. How do I save the contents of the webpage as a csv or text file?

How do I open / edit a .sdb file

I have a .sdb database file which I need to open. It's the database behind Song Pro (http://creationsoftware.com/).
Google seems to think that openoffice may be able to open this, as it might come from star office. But I can't persuade the file to open in Base 3.2 and there are no reliable instructions as most google results are of the extension definition type.
Initially I could do with doing this in a database browser to see how the database is laid out. But assuming it is holding the correct data I will then want to do this programmatically.
Any help much appreciated.
Thanks
Jona
This page says that the SongPro .sdb file is an MSAccess database and you can just rename it to .mdb and open it with MS Access. There's also a script linked that someone has written to convert the contents of the database.

How to edit a Word Document (.docx) stored in a SQL Server Table?

How to edit a Word Document (.docx) stored in a SQL Server Table?
Here is the tentative work flow:
Read BLOB from SQL Table through Ideablade
Write BLOB to disk as .docx
Open .docx using Word
User makes changes
Save .docx using Word
Read .docx into BLOB
Write BLOB back to SQL Table through Ideablade
All sample code is welcomed?
I am sure there are a lot of people doing this already.
Any other ideas on how to simplify this process?
I am using VB.NET, .NET 3.5 SP1, WinForm and SQL Server 2008.
Well, as to the how, here is how to read a blob and write a blob to SQL. Although frankly, unless you have very good reasons such as an existing backup system, you would probably be best served storing the file to the file system and the path and metadata in the database. Either way, abstract it in your BLL, so you can change your mind down the road.
Retrieving and updating the BLOB from the db shouldn't be a problem, you'll find lots of sample code to do that on the net.
A simple approach to your problem would be to create a "temp" or "working" directory somewhere and monitor it with System.IO.FileSystemWatcher (sample code). When the user wants to edit a file, fetch it from the db and store it the directory. Whenever the user saves the file, you'll get a notification from your FileSystemWatcher, so you can save it to the database. Don't forget to empty the directory from time to time.
The method I've seen for this that I think works best is to build this as an add-on for MS Word itself. Examples include the Save to Sharepoint, Save to Moodle, and other similar add-ins.

Method to generate pdf from access+vb6 or just sql 2005?

The setup:
Multiple computers using an adp file to access a sql 2005 database. Most don't have a pdf distiller. An access form (plain form, not crystal) is created that needs to be saved as a pdf.
The only way I can think of is send a request from access to the sql server for a web page. Something like:
"http://sqlserver/generatepdf.php?id=123"
I'm trying to avoid the web page 'middle man'. Is there a way to generate the pdf in T-SQL? Anyone have any other ideas. I'm not looking for code, just methdology ideas.
Thank you
Save the form as a report, then use Access MVP Stephen Lebans free A2000ReportToPDF utility to convert it to a pdf file.
http://www.lebans.com/reporttopdf.htm
If they have Access 2007 they can download and install the free Microsoft Office 2007 Add-in to save documents as PDF or XPS.
http://www.microsoft.com/downloads/details.aspx?FamilyId=4D951911-3E7E-4AE6-B059-A2E79ED87041&displaylang=en
Microsoft's ReportViewer client can generate pdfs natively.
It works inside of web pages and windows forms/wpf apps. You can programmatically trigger the export as well. The only downside is that you'll need to basically redo your form as a report.
I must admit that I did not get it: you want to export an Access form and its data into a PDF file? Your form is basically graphics, not text, nor report. Do you mean that you want this form to be included as (for example) a .png file inside a PDF file or do you want it to be a full PDF file inheriting objects from the original form and allowing things such as text search and so on?