Loading Rich Text Box from SQL Server 6.5 Text Field 
Author Message
 Loading Rich Text Box from SQL Server 6.5 Text Field

Does anybody have any idea how to populate a standard rich text box control
directly from a SQL Server 6.5 Text Field.

At present I am able to achieve this effect by using GetChunk to load the
data into a disc file and then load this into the rich text box.  Is there
any way of directly loading the data from the text field into the rich text
box??



Mon, 24 Jan 2000 03:00:00 GMT  
 Loading Rich Text Box from SQL Server 6.5 Text Field

Anup:

Try this
First, Link your table in SQL server to an Access one and then use this
code:

Dim Db as Database, Rs as Recordset, SQL as string
Set Db = Workspaces(0).Opendatabase("Myaccessdb.mdb")
SQL = "SELECT mytable.RTFfield FROM mytable WHERE key= 1"
Set Rs = Db.OpenRecordset(SQL,dbOpenSnapShot)
Richtextbox1.text = Rs!RTFfield
Db.close

I hope this could serve you
Federico Cirett



Sun, 30 Jan 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Project: Retrieving text fields from SQL Server 6.5

2. Import text file in SQL Server 6.5 via SQL in Visual Basic

3. Import text file in SQL Server 6.5 via SQL in Visual Basic

4. Need to truncate textfile info being loaded into Rich Text Boxoading Text Box infppo to RichTeboVB

5. Text/Memo Fields in SQL 6.5

6. ADO / SQL 6.5 / Text Fields

7. Searching a Text column (SQL Server 6.5)

8. Problem with Crystal Reports and Excel OLE-object stored in SQL Server 6.5 and vertical text

9. Rich Text Box: Can I remove text and keep multicolored text

10. Colour Text Box/Class Wrapper for Rich Text Box

11. Newbie question: Rich Text Box vs. Text Box

12. help: formatting rich text box/text box

 

 
Powered by phpBB® Forum Software