|
-
Jun 19th, 2000, 09:07 AM
#1
Thread Starter
Junior Member
I am using a Winsock (TCP/IP) control in order for users to connect to what is essentially a group chat. Each user has a database on the server. My trouble comes when accessing the databases. The following declarations must happen. More, actually, but this is all I have at the time.
Set CharData = DBEngine.Workspaces(0).OpenDatabase(App.Path + "\" + Character + ".mdb")
Set Armor = CharData.OpenRecordset("Armor", dbOpenTable)
Set Attributes = CharData.OpenRecordset("Attributes", dbOpenTable)
Set Clothing = CharData.OpenRecordset("Clothing", dbOpenTable)
Set Description = CharData.OpenRecordset("Description", dbOpenTable)
Set General = CharData.OpenRecordset("General", dbOpenTable)
Set Jewelry = CharData.OpenRecordset("Jewelry", dbOpenTable)
Set Skills = CharData.OpenRecordset("Skills", dbOpenTable)
Set Location = DBEngine.Workspaces(1).OpenDatabase(App.Path + "\Location.mdb")
Set LocGeneral = Location.OpenRecordset("General", dbOpenTable)
Set LocItems = Location.OpenRecordset("Items", dbOpenTable)
Set LocPeople = Location.OpenRecordset("People", dbOpenTable)
The trouble comes in not wanting to declare this every time declare all these every time I get incoming data from one of the users. However, I can't find an easy way to name the databases and recordsets in order for the code to know which user I am referring to. I was going to do Set Jewelry(1 to 2000) as Recordset, for example, but am unable. Help? Please?
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
|