|
-
Aug 22nd, 2004, 12:11 PM
#1
Thread Starter
Junior Member
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
-
Aug 26th, 2004, 12:15 AM
#2
Junior Member
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 .........
-
Sep 3rd, 2004, 02:03 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|