Export CSV from a DataTable VB.Net Tutorial

Before XML is widely used for data communications between the systems/applications, we have used CSV. Even now for when the new systems are being developed which needs to be communicated with these legacy applications, we have no choice if we cant choose anything other than those systems are using. I am planning to develop a class which can be useful for exporting CSV.

Delimiter

CSV is a character separated values format so we have to choose a character as a delimiter. As delimiters are chosen based on various factors we need our class to be delimiters configurable.

Text Qualifiers

As there will be a risk if the delimiter is already present in the data, the text qualifiers are used to identify the text element’s boundary. Within this boundary if a delimiter character is present then the class will not consider it as a delimiter.

Configurable Column Headers

Some of the interfaces will not l ...

Read more here:   Export CSV from Dataset 

Tutorial on Sending Email

If you are still working in classic VB, sending email is not as easy as we do in asp.net. Especially for notifications emails are one of the best ways to communicate. Normally the SMTP server will be in separate email hosting server reachable from application server. In this scenario we need to configure CDO to use our SMTP server. Then only the mail relay will be successful.

The function we are discussing will support most of the email functionalities like CC, BCC and attachment.
 
The function will return the status about sent. Since this function is designed for applications, the related settings can be fetched from settings file rather than changing the code and re compiling to take changes.

Basically the following configurations are necessary before sending mail with CDO object
•  CDO.Message
• CDO.Co ...

Read more here:   VB Send Email