We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DocIO Mail merge with Oracle database

Thread ID:





101507 Oct 30,2011 10:37 PM UTC Nov 10,2011 09:07 AM UTC WinForms 3
Tags: DocIO
W. ter Horst
Asked On October 30, 2011 10:37 PM UTC


I have an Oracle database and I would like to use DocIO to fill the customers fields in a letter from a table of that database. How can i do that with Oracle?


Poornima R [Syncfusion]
Replied On November 4, 2011 12:44 PM UTC

Hi Horst,

Thank you for your interest in Syncfusion Products.

Regarding your query “Using Oracle data base in mail merging”:
Please try using the following two steps to use oracle database in mail merge
1) Initially oracle database should be connected to the client application. Once the data base is connected the required table needs to be populated in the DataSet. Please find the following code snippet illustrating the same

//Create an instance for oracle connection
OracleConnection conn = new OracleConnection();
//Set connection string
conn.ConnectionString = "Data Source=" + ";Integrated Security=yes";
//Open connection
//Create oracle command
OracleCommand command = new OracleCommand("Select * from Employees", conn);
//Create an instance for dataset
DataSet ds = new DataSet();
//Create oracle data adapter
OracleDataAdapter oraDa = new OracleDataAdapter(command);
//Fill dataset
oraDa.Fill(ds, "TableName");

2) Once the data set is populated using the above code, mail merging can be performed in DocIO using the populated data set as in the below code

// Creating a new document.
WordDocument document = new WordDocument();
// Load template
document.Open("Input.doc", FormatType.Doc);

// Execute Mail Merge with groups.
// Saving the document to disk.
document.Save("output.doc",FormatType.Doc );

To know more about mail merging, please refer the below online documentation and UG link

Online documentation link:

Online sample link:




Please let us know if you have any questions.

W. ter Horst
Replied On November 7, 2011 08:24 PM UTC

Thanks for the reply,

I have some views can I use a view to merge data in a letter?

Gunasekaran T [Syncfusion]
Replied On November 10, 2011 09:07 AM UTC

Hi Horst,

Thank you for your update.

Yes, you can use view to merge data using mail merge functionality of DocIO. For merging the data from the Views please use the SQL command mentioned below.

SQL command to merge data from Views:

Example: SELECT * FROM EmployeesView.
EmployeesView is the view created for the table Employees.

Please let me know if you have any queries.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon