This message contains graphics. If you do not see the graphics: Graphic Version.
 
Databases with TX Text Control .NET for Windows Forms, Working with RSS Feeds

Using an Access database with TX Text Control .NET for Windows Forms

Using TX Text Control ActiveX and Visual Basic 6, you can use an ADO Data Control (ADODC) to select records from a database or create a database connection at run-time. In Visual Basic .NET, you can do exactly the same; however there are a few differences in the implementation.

This newsletter shows you how to work with an Access database using TX Text Control .NET for Windows Forms.

We use the OLE database connection to open an Access database. First of all, we need to create a connection string that contains the path of the database and the database interface that is being used. Using this string, we create a new OLE database connection.

strPath = CurDir(Application.ExecutablePath) & "\rtf_default.mdb" strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPath oleCon = New System.Data.OleDb.OleDbConnection(strCon)

After declaring the connection and setting the Connection string, we can open the database.

oleCon.Open() oleAdp = New System.Data.OleDb.OleDbDataAdapter("select * from Table1", oleCon) oleAdp.Fill(dsF, "Table1") oleCon.Close()

The SQL statement SELECT fills a DataSet with the rows of Table1. To get the values of a specific field in a row we create a DataRow and fill it with the specific data.

Dim rw As DataRow = dsF.Tables("Table1").Rows(iRw)

One database field in a row can be accessed by specifying the columns name.

Dim btBuffer As String = rw("document")

In our sample, we have a database storing RTF documents. These documents are going to be loaded into a variable and imported into TX Text Control .NET for Windows Forms using the Load method.

TextControl1.Load(btBuffer, TXTextControl.StringStreamType.RichTextFormat)

To insert a document into the database, we have to save the contents to a variable and insert them into the database using the INSERT SQL statement. In this sample, we step forward and backwards through the database and insert new documents into the database in RTF format.

TextControl1.Save(txContent, TXTextControl.StringStreamType._ RichTextFormat) Dim sqlStr As String = "Insert Into Table1(document) VALUES_ ('" & txContent & "')"

In order that this example applications will run, you have to have TX Text Control .NET for Windows Forms (trial or full) and Visual Studio .NET 2003 installed on your PC.

Working with RSS Feeds

In last week's newsletter, we launched a series of RSS feeds that have been designed to keep you up to date with TX Text Control news and happening is the TX Text Control forum.

We have had a good response with several thousand downloads of the XML files. However, after speaking to some customers, we realize that many of you are not familiar with the RSS technology.

What are RSS Reeds?

Think of an RSS Feed as a kind of web page and the RSS Reader as a browser. Once you have subscribed to our RSS feeds, your RSS Reader will download the RSS feeds at a predetermined rate (probably several times a day). Whenever you want to learn what is new at textcontrol.com, you can simply click on one of the TX Text Control feeds in your RSS Reader, scan the headlines and read only what is of interest to you.

How can I use them?

The screenshot below shows FeedReader, a basic RSS Reader, that can be downloaded freely. There are many more RSS Readers that offer considerably more comfort and features. However, as a starting point, we would suggest that you download and install this one.

Why is RSS better than surfing the web or reading e-mail newsletters?

Unlike the web, where you have to go looking for a site, and can never be sure what is updated and when; or e-mail newsletters, which are often incorrectly caught in spam filters, our RSS feeds provide information that is targeted, filtered and gives you the choice of whether to read a new item or skip over it.

Subscribe today

Subscribe to the TX Text Control RSS feeds today and never miss any TX Text Control news again. It is completely free and anonymous. Just add the feeds to your RSS Reader!

https://www.textcontrol.com/news/syndication/


Best regards

The Newsletter Team

Text Control GmbH respects your online time and privacy. We only send this newsletter to TX Text Control customers and people who have signed up to receive it. However, if you would prefer not to receive future issues of the newsletter, you may unsubscribe at any time. If you received this newsletter forwarded from a colleague or friend, you may wish to subscribe directly.

Sent to: N/A.

Imprint | Unsubscribe | Subscribe

© 2004 Text Control GmbH. All Rights Reserved.