FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Get value from database to Literal

Last post 09-26-2008, 2:22 AM by schneier. 2 replies.
Sort Posts: Previous Next
  •  09-24-2008, 6:32 AM 9471

    Get value from database to Literal

    Hi,

    I've managed to store the text that you type in the freetextbox into a varchar(max) in the database. My problem is how i get the information stored as a varchar(max) in the database out in a literal. Should i use the sqldatareader and call some specific method to get the right format? I've tried to get the information out of a dataset, but get the message that no object is referenced (or something like that).

    Do you have any tips?

  •  09-25-2008, 9:10 PM 9476 in reply to 9471

    Re: Get value from database to Literal

    You should investigate writing queries a little more. Here is a link to get you started:

    http://www.sql-tutorial.net/

    In the meantime, you should use a basic select query that returns the specific row and column containing the varchar and return that value as a string. The literal should be able to take that string as its Text property. You should not need to do any formatting to accomplish this.

    Forget about using a dataset in this situation unless you have a list of freetextboxes to populate. If this is the case then you will want to investigate the sqldatareader a little more as you will need to populate a dataset (or class list) in that instance.

    I hope that helps.

    Mark

     

  •  09-26-2008, 2:22 AM 9480 in reply to 9471

    Re: Get value from database to Literal

    Thank you for your help!

View as RSS news feed in XML
www.freetextbox.com