converting data from a dataset to a variable

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default converting data from a dataset to a variable

    I am currently experimenting with ASP.Net and am struggling to simply
    manipulate some database data.

    Using the same methodology as i would for asp in dreamweaver i have written
    the following code:<%
    <%
    Dim dtNow As string
    dtNow = ds_news.FieldValue("Date", Container)
    %>

    However, i now receive an error saying that "container" is not defined. Can
    someone help me out here? where am i going wrong? I have purchased an asp.net
    book but it likes to push the separation of the server side code and the design
    code which does not help me.

    I am faced with a scenario where my aspx page is showing the date as
    10/27/2005 00:00:00 and i want to change the format, but i cant even convert
    the database data to a variable!

    How should i go about this problem?

    baz0hara Guest

  2. Similar Questions and Discussions

    1. Assigning a table value from a dataset to a variable
      I have been trying to do this for some time and have had no success. Now I can spit out something from the table by putting the control <%#...
    2. Setting a value from a dataset as a variable in asp.net
      My page loads and creates a dataset, and also collects data from the url I want to compare the data from the url with value from the recordset (i...
    3. Pass Dynamic Variable in MM:DataSet
      I've got a stored procedure that returns the value of the @@IDENTITY After Inserting data. I'm Using the Dreamweaver Stored Procedure under .net...
    4. Typed DataSet and converting types
      Hi there! I've met strange behavior in VS 2003: I created Web service with web method which returns typed DataSet with some fields of "date"...
    5. [imagick] converting to variable instead of file
      hi all, With imagick_writeimage() function, is it possible to send the image to a variable instead of dumping it to a file or to the client...
  3. #2

    Default Re: converting data from a dataset to a variable

    I have done what was needed by creating the below function. Can you only
    manipulate data through functions in ASP.Net?

    Function dateFormat (dtDateBeg As DateTime) As String
    dtDateBeg = DateTime.Now
    return dtDateBeg.ToString("MMM dd, yyyy")
    End Function


    <%# dateFormat(ds_news.FieldValue("Date", Container)) %>

    baz0hara Guest

Posting Permissions

  • You may not post new threads
  • You may 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