In my application I want to be able to send data to a user who can then import it into some other application - a report writer, spreadsheet, database or whatever else.
I'm looking at various techniques and would like input from the community. I intend sending an email with an attachment. The question is in what format, a tab or comma delimited file? A file of XML or .... what? The file is a representation of an NSMutableArray with some 600+ elements. I'm assuming the user doesn't have access to a relational database so SQL is not an option.
Advice and experiences greatly appreciated.
Comma delimited is the most importable, assuming your data can be represented in that way - XML is too generic, anything could read it but nothing would know what to do with it.
Related
I wanted to send an email with attachment from the oracle apex workspace, currently i am using the APEX_MAIL package which includes (APEX_ATTACHMENT, APEX_EXPORT functions). But the issue is, we are creating an CSV file and adding it as a mail attachment while sending the email and the attachments are sometimes larger in size which are getting stored in server each time the mail is triggered. This issue is causing a regular maintenance for the DBA to clear the data in the server.
Can anyone suggest is there any alternative for the current approach in order to come out of the issue.
Thanks in advance.
I tried oracle APEX_MAIL but the attachment is saving in database, please provide the alternate approach for the solution.
If you are generating the attachment CSV in the procedure as a BLOB variable, you can use it as described here. The only difference would be you should send your blob variable for p_attachment parameter.
For example:
apex_mail.add_attachment(
p_mail_id => l_id,
p_attachment => v_CSV, --the CSV file that you generated and assigned to a variable of type BLOB
p_filename => l_filename,
p_mime_type => l_mime_type,
p_content_id => l_content_id );
If you do not generate the CSV file in the package yourself, another approach would be using an intermediate table where you save your attachment file and having a scheduled job that clears that intermediate table on a specified basis. (You can clear the table after the mail is sent but for the logging/reporting it would be better to keep the attachments for a while I believe).
I have a ready script which sends email using PL/SQL. It has been stored in a procedure and when it is called by passing proper parameters, it sends email.
Now, I need to pick up a file from the disc and send it as an attachment. I have seen many examples where the data is stored in BLOB and comes from the DB. In my case it is not from DB instead it is a file on the server/disc.
How to achieve this ?
Use UTL_FILE to read data from disk.
You can find a good example of how to use it to load an entire file into a BLOB in the Alexandria PL/SQL Library. Look at (or just copy!) the code from file_util_pkg.get_blob_from_file.
ORACLE DIRECTORIES can be used to achieve this.
link to a full email/smtp example
I m working of a project of Enterprise application architecture using software talend
i have this table : User(Id_user, name_user, Email)
what i want to do is select Data from this table and sending email to each user using Tsendemail component
i could so far make a connection to Database using TMssinput and send a single email using Tsendemail
but i dont know how to select values of Row and use them as "email" for Tsendemail
Can someone help me pls ? and thank you
As tSendMail component is not a processing component (ie, it cannot handles more than one vector in input) but a starting component, the best way to do so is to use the good-ol' tFlowToIterate as we did here. Your job will almost look like:
tMssInput---row---->tFlowtoIterate--->Iterate---->tSendEmail
Inside the tFlowToIterate instance you're going to put everything you need from row into the globalMap. Every data-processing operation should be done before that, on the row context (for example, filtering out users you won't the mail to be sent, etc.).
We have an Firebird database for a (very crappy) application, and the app's front end, but nothing in between (i.e. no source code).
There is a field in the database that is stored as -2086008209 but in the front-end represents as 63997.
Examples:
Database Front-End
758038959 44093
1532056691 61409
28401112 65866
-712038758 40712
936488434 43872
-688079579 48567
1796491935 39437
1178382500 30006
1419373703 66069
1996421588 48454
890825339 46313
-820234748 45206
What kind of storage is this? The aim for us here is to access the application's back-end data and bypass the front-end GUI alltogether, so I need to know how to decode this field in order to get appropriate values from it. It is stored as a int in FireBird (I don't know if FireBird has signed/unsigned ints, but this is showing as signed when we select it).
This is the definition of the field:
It is not, as far as I can tell, de-normalised. The generator GEN_CONTACTS_ID has 66241 against it, which at a glance looks accurate.
I work on with an application that stores bitmaps in integers (just don't ask), if you express them in that form do you something useful or consistant
My impression is that the problem is in the front end. If what is stored in the DB is -2086008209, then what is stored in the DB is -2086008209. To understand better how the application is manipulating the data, try storing other numbers in the DB and see how they are displayed.
Did you come to this realization through logging SQL? If you havent, you may serve yourself well by using the Firebird Trace API to get that SQL: http://www.firebirdfaq.org/faq95/. An easier tool to parse the Trace API is this commercial product: http://www.upscene.com/products.fbtm.index.php.
I've used these tools and other techniques (triggers etc,.) to find what an application is using/changing in the Database.
Of course, if the SQL statement is select * from table, then these tools would not help much.
hi friend
can any one tell me that i have web server there i have create the database for store some value for registration form the value was save in webserver this is working good
but now that data coming in json format and now i have fetch json value and save in to the local database which is same as the webserverdata base both the side ssame table and same colume name is there how can i do this
and how to writ the query for this sitution help me
Various JSON parsers exist for objective c. You'll have to pass the data to a library or to javascript in a webview to extract it. Here is a google library:
http://code.google.com/p/json-framework/
If you need help with saving the data, I say with no snideness whatsoever that you should read the manual:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOM.html
In