PLs help me here!!

Discussion in 'C#' started by hammywong, Aug 18, 2006.

  1. #1
    hi..everyone i need some help here! i'm starting to learn ASP now. and i face some problem here, i hv create a simple form,and then i wan create 3 function button, there are Add, Edit and Delete. and then i wan display the added record under the 3 function button there. i hv successful done the add function, edit and delete function. But i have a problem here, that is i dun know how to show the 2nd row for my 2nd add record. i hope someone can tell me here~~! i hv post a screenshot here, hopefully can get someone help.thx a lot!~!
     

    Attached Files:

    • h1.JPG
      h1.JPG
      File size:
      24.5 KB
      Views:
      220
    hammywong, Aug 18, 2006 IP
  2. fluid

    fluid Active Member

    Messages:
    679
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    70
    #2
    I dont quite understand what you are trying to achieve here. Post a screenshot of how you want it look like when you've added the second row and tell us how you are adding the records eg Array? Dictionary Objects? Hastable?
     
    fluid, Aug 18, 2006 IP
  3. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #3
    I think he doesn't know how to LOOP

    one way you could list the items from the DB is that you use this example

    rsYourData.MoveFirst
    do while not rsYourData.EOF
    <!--do your actions here-->
    rsYourData.MoveNext
    loop
    rsYourData.Close

    I think you'd better add another column as ID for each record
     
    ludwig, Aug 18, 2006 IP
  4. rahulm

    rahulm Peon

    Messages:
    178
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do u want to show only current added record or u want to append it in the table . If u want to append it in the table then u hav to dynamiclly create the table (or Grid if ur using ASP) aothr vise take three text box and evry time clear them and fill the current data
     
    rahulm, Aug 19, 2006 IP
  5. Link.ezer.com

    Link.ezer.com Peon

    Messages:
    647
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you need StaticRecordset :)

    For Access ..... is GetMDBStaticRecordset ....
    For Excel: GetExcelStaticRecordset
    For FoxPro :GetExcelStaticRecordset
    For Text : GetTextStaticRecordset
    For dBase : GetdBaseStaticRecordset

    For SQLserver usage :
    without GetSQLserverStaticRecordset [ includes static counting ]
    you might have problem to run the correct record

    GetSQLserverRecordset [ no static counting ]
    I think you are using serverRecordset

    Example Code:
    ....
    sub= " order by c1"
    SQL="select * from Table where c1='"&b1&"' " & sub
    Set rs= GetSQLserverStaticRecordset( conn, SQL)
    rs.AbsolutePosition=5
    .....


    '---------ezer.com----example code---------
    SQL="select * from aTable "
    Set rs = GetSQLserverStaticRecordset( conn, SQL)

    rs.PageSize = 10
    rs.PageCount
    ShowOnePage rs, Page


    Sub ShowOnePage( rs, Page )

    End Sub .......

    Source and more details from::
    http://3w.ezer.com/asp/recordset/getsqlserver-staticrecordset.asp
     
    Link.ezer.com, Aug 26, 2006 IP