Results 1 to 8 of 8

Thread: [RESOLVED] Need help with this assignment.

  1. #1

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    Resolved [RESOLVED] Need help with this assignment.

    I'm doing a project where we are re-creating a very old system.
    The client wants the same base functionality and some improvements.

    One of the things I'm currently working on is the note-system. These are used as flags of some sort, but are also used as a comment field for some products or client profiles.

    In the old system you could write the text and save it like you would get in a .txt file. They want the new one to be able to do word formatting such as:

    Different font sizes (Only some parts of the text)
    Different font colours (Only some parts of the text)
    Underlining of words
    Bolding
    Italics
    Tab-spaces

    Those are the specs they want. What I need to know is the following:

    1) How do I do that?
    2) Currently they store all these files on the server as text files and the database have paths that refers to each file. I want to be able to save a text file with that formatting to the HDD of the server like in the old system.
    3) If possible I would like to save that text to the database with the formatting.

    Any help would be very much appreciated.

  2. #2
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: Need help with this assignment.

    Why don't you save the formatted file as Word Document ?
    thanks
    amrita

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Need help with this assignment.

    Quote Originally Posted by amrita View Post
    Why don't you save the formatted file as Word Document ?
    And, taking this one step further, saving that Word document, as a BLOB, in a SQL Server database table.

  4. #4

    Thread Starter
    Addicted Member tgf-47's Avatar
    Join Date
    Feb 2010
    Location
    CapeTown, South Africa -34.01244,18.337415
    Posts
    209

    Re: Need help with this assignment.

    Ok, saving it as a BLOB in SQL. So what are my file-size limits here?
    And how do I pass it with the formatting? Currently I read everything into a string and do a normal insert into...

  5. #5
    New Member
    Join Date
    Mar 2007
    Posts
    4

    Re: Need help with this assignment.

    You can use the Rich Text Box control, you will easily be able to save the text with all formatting. An rtf document is supported by word.

    You would need to create the buttons for formatting like bold etc with different code.

    But then use
    Code:
    RichTextBox1.SaveFile("\\serverpath\textfilename.rtf")
    function and load in the similar format.

    -Dual

  6. #6
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: Need help with this assignment.

    thanks
    amrita

  7. #7
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,415

    Re: Need help with this assignment.

    Quote Originally Posted by tgf-47 View Post
    Ok, saving it as a BLOB in SQL. So what are my file-size limits here?
    And how do I pass it with the formatting? Currently I read everything into a string and do a normal insert into...
    using a rtb, the rtb.rtf property contains the formatted text, so you could save that + reload it that way too

  8. #8
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Need help with this assignment.

    +1 more for the RTB ... simplest way to go to get that function.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width