Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Obyron
Novice


Joined: 29 Jan 2006
Posts: 40
Location: Aardwolf

PostPosted: Tue Apr 18, 2006 8:24 am   

COM Scripting / External DB Access
 
I'm doing a lot of work with scripts right now to access external databases, currently using COM scripting with ODBC. To make a painfully long story short, it's making me lose my religion. Is there anything in the CMUD Beta that's going to make this significantly easier to do? (ie: Should I wait, or bite the bullet and do it the way I currently am.)

My question is more about the database access issue than the COM support issue, since I'm sure you're not going to package CMud without something pretty basic that ZMud already has.


--Obs
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Apr 18, 2006 7:17 pm   
 
Several improvements planned for CMUD will address this:

1) COM scripting won't change much, except for fixing a few bugs. My guess is that the issue you are having is more related to the complexity of COM rather than the zMUD COM interface, but if you have suggestions for improvments to COM support in CMUD, let me know.

2) The main thing that will eventually help you is the integration of the zApp components into CMUD. If you go over to the zApp area and look at the documentation, you will see that zApp provides a powerful set of database access components that give you *native* database access speeds, rather than having to use ODBC or ADO. The zApp components are based upon JDBC and supports a large number of databases.

3) The database module that is included with zMUD is planned to be rewritten for CMUD to use these native database controls. The zMUD database isn't really a database. It's a flat binary file with no indexing or SQL support. By converting the database module to use the zApp components, you will get full SQL database access routines within CMUD. This is planned within the next 6 months or so.

So yes, there will be a lot of improvement in CMUD in this area, but nothing is planned for the first beta release. The database features will be added over the course of the beta period during the next several months.
Reply with quote
Obyron
Novice


Joined: 29 Jan 2006
Posts: 40
Location: Aardwolf

PostPosted: Tue Apr 18, 2006 7:33 pm   
 
That's exactly what I wanted to hear. Fantastic. :)


My problem with COM is partly due to the complexity of the system depending on the libraries you're working with, and I recognize that's not a ZMud issue. My issue with ZMud's handling of COM is that there's no way to do any graceful error handling, and the script end user is left with helpful instructions like "Keep clicking F3 and clicking OK, while praying." (See my iTunes script in the Finished Scripts forum)

Some graceful way for scripters to handle COM errors would be heavenly.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Apr 18, 2006 7:39 pm   
 
Heh, I just had to laugh a bit when I read that. No disrepect intended to you at all, but I laughed because error handling is a huge mess in COM, not just in zMUD but in any application. Especially with stuff like ODBC and ADO.

About the only suggestion I can make is to use the %isnull function to test your COM variables to make sure that properties are getting assigned properly. COM doesn't really set any error status (it's up to each library to decide on it's own how to handle errors). But in general, if there is an error accessing a property of a COM object, you will get a null value that you can test.
Reply with quote
Obyron
Novice


Joined: 29 Jan 2006
Posts: 40
Location: Aardwolf

PostPosted: Wed Apr 19, 2006 3:41 am   
 
No disrespect taken. I completely agree with you that COM in general is pretty FUBAR. The suggestion is something I'll have to play around with. I think I tried it but had no luck. I'll move any further discussion over to the scripting forum, since you're more than answered my question wrt CMUD. For the record: I can't wait.

--Obs
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net