Results 1 to 3 of 3

Thread: Help! incorrect data format

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Posts
    106

    Help! incorrect data format

    Hi,

    I have a AddtoCart function, how do i convert the Dreamweaver's
    tags to Session variables below?

    -

    Sub AddToCart(s As Object, e As EventArgs)

    dtCart = Session("Cart")

    drCart = dtCart.NewRow
    drCart("ProductID") = <%# ds.FieldValue("id", Container) %> <-ERROR
    drCart("ProductName") = <%# ds.FieldValue("name", Container) %> <-ERROR
    drCart("Cost") = <%# ds.FieldValue("cost", Container) %> <-ERROR
    dtCart.Rows.Add(drCart)
    Session("Cart") = dtCart

    dg.DataSource = dtCart
    dg.DataBind()

    End Sub

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Help! incorrect data format

    I'm not sure.

    VB Code:
    1. Sub AddToCart(s As Object, e As EventArgs)
    2.  
    3. dtCart = Session("Cart")
    4.  
    5. drCart = dtCart.NewRow
    6. drCart("ProductID") = ds.Table(0).Rows(0).Item("id").ToString()
    7. drCart("ProductName") = ds.Tables(0).Rows(0).Item("name").ToString()
    8. drCart("Cost") = ds.Tables(0).Rows(0).Item("cost").ToString()
    9. dtCart.Rows.Add(drCart)
    10. Session("Cart") = dtCart
    11.  
    12. dg.DataSource = dtCart
    13. dg.DataBind()
    14.  
    15. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Posts
    106

    Re: Help! incorrect data format

    can't.

    Compiler Error Message: BC30456: 'Tables' is not a member of 'DreamweaverCtrls.DataSet'.

    i think dreamweaver has its own way of datasets/containers, anyone knows?

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