Results 1 to 3 of 3

Thread: A CLASS for DATABASE

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Location
    Earth
    Posts
    17

    A CLASS for DATABASE

    Hi Readers

    I want to implement a Database class. That class will inherit all the capabilities of a connection and recordset. But with Additional Properties, Methods and events for example a Method of GENERATING RECORD NO. for example I want something like this:

    dim my_new_recordset new my_recordset_with_additions

    new_rec_id = my_new_recordset.generate_id(method_1_or_2)

    ------------------------
    Here method_1_or_2 means that there would be 2 different ways of generating the IDs, like

    first methode is :
    new_id_A = recordcount + 1

    while the 2nd will be:

    recordset.filter "type ='Assets'"
    recordset.movelast
    new_id_A = recordset.field("code_for_Assets")+1

    -------------------------------------------------------------------------
    Thanks & Regards

    Zeeshan Hashmi

  2. #2
    Junior Member
    Join Date
    Aug 2004
    Location
    Pune
    Posts
    19
    hello

    use max function for that to find max value in query don't use recordcount + 1 take the max value and add + 1 in that also check that if query return empty then pass only 1 .........
    vaishu999

  3. #3
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: A CLASS for DATABASE

    Originally posted by ZeeshanVB
    Hi Readers

    I want to implement a Database class. That class will inherit all the capabilities of a connection and recordset. But with Additional Properties, Methods and events for example a Method of GENERATING RECORD NO. for example I want something like this:

    dim my_new_recordset new my_recordset_with_additions

    new_rec_id = my_new_recordset.generate_id(method_1_or_2)

    ------------------------
    Here method_1_or_2 means that there would be 2 different ways of generating the IDs, like

    first methode is :
    new_id_A = recordcount + 1

    while the 2nd will be:

    recordset.filter "type ='Assets'"
    recordset.movelast
    new_id_A = recordset.field("code_for_Assets")+1

    -------------------------------------------------------------------------
    Are you asking a question or something? I think you have a great idea! - I just can't tell why you're posting, sorry.

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