Professional Web Applications Themes

ASP/SQL Query Recordset up to 200 characters? - Dreamweaver AppDev

Is it possible through SQL to query a recordest lets say a memo description feild for lets say only the first 200 characters? Or To somehow control this through CSS? Please advise. Speegs...

  1. #1

    Default ASP/SQL Query Recordset up to 200 characters?

    Is it possible through SQL to query a recordest lets say a memo description feild for lets say only the first 200 characters?

    Or

    To somehow control this through CSS?

    Please advise.

    Speegs
    Speegs Guest

  2. #2

    Default Re: ASP/SQL Query Recordset up to 200 characters?

    The easiest way is to simply pull the first 200 characters using VBScript:

    <%= Left(yourRecordset('yourMemoField'), 200) %>

    That would do it :)
    webshorts Guest

  3. #3

    Default Re: ASP/SQL Query Recordset up to 200 characters?

    Thanks Daniel, it worked like a charm.
    What is the significance of left? Just curious, also would it be possible to tell it to stop at the first period or end of sentence it finds.

    Speegs
    Speegs Guest

  4. #4

    Default Re: ASP/SQL Query Recordset up to 200 characters?

    Actually, you could do this in the query even easier (well, the same way at
    least)

    SELECT left(yourFirld,200) as 'myMemo'...

    that way you don't have to deal with it on the page. Of course this will
    truncate the field for ALL records but that seems to be what you want. Look
    up INSTR functions to stop at the 1st period or anything else.

    Left syntax is "starting from the LEFT return the N number of characters
    from the given field". It's one of the basic SQL commands or other
    programming languages with string variables.

    HTH

    David


    "Speegs" <webforumsusermacromedia.com> wrote in message
    news:d1bk4k$nfu$1forums.macromedia.com...
    > Thanks Daniel, it worked like a charm.
    > What is the significance of left? Just curious, also would it be possible
    to tell it to stop at the first period or end of sentence it finds.
    >
    > Speegs

    DavidT Guest

Similar Threads

  1. Problems with Recordset (Query) in Dreamweaver BindingsPanel
    By ChuckRWD in forum Coldfusion Database Access
    Replies: 2
    Last Post: November 24th, 05:53 PM
  2. recordset query not working
    By Don Pacino in forum Dreamweaver AppDev
    Replies: 5
    Last Post: April 2nd, 09:13 PM
  3. Getting 0 recordset in MS Access Query
    By jt in forum ASP Database
    Replies: 4
    Last Post: May 24th, 04:27 AM
  4. Replies: 1
    Last Post: March 3rd, 02:15 PM
  5. PHP & Simple Recordset Query
    By myvette webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 16th, 07:31 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139