|
-
Sep 11th, 2002, 03:41 AM
#1
Thread Starter
Hyperactive Member
SQL Query in a variable as RecordSet
Hello,
I've programmed a server which uses a database to get and store information about the users. The server supports multiple connections and data is saved alot.
Because of the CPU use of the server with every huge action a user does, I'm thinking about changing the updating and retreiving to and from the database (MS Access) to using variables, and saveing the data to the database in a interval of 15 minutes. The loss of data in a server crash is acceptable, crashes are not common (anymore ).
Now, I have a function called SQL(strQuery) as RecordSet which I call to get the database information. Updating is done local:
VB Code:
Dim RS as RecordSet
Set RS = SQL("SELECT * FROM Users")
RS!UserName = "Guest"
Now I was wondering when I create a variable like
And I copy the whole Users table from the database into this variable, how I can select a few records from the variable as a new recordset.
So my SQL function could do a routine on the variable 'Users' and the rows left over after a selection routine could be returned as the SQL() so I don't have to update all the code elsewhere in the server.
However, this setting of the SQL() must be done ByRef because, when someone would so Set RS as SQL("SELECT * FROM Users") and change the RS, the corresponding field in the Users variable (used by the SQL() function) should also change to the new value.
Is this possible, if please can someone show me how?
Thank you for your time...
"Experience is something you don't get until just after you need it."
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
|