PDA

View Full Version : DBEngine Database LISP Interface.


peter
2004-07-25, 01:23 PM
First Has anyone ever done this?

I have the DBEngine loaded I am having trouble getting to the field objects from the recordset objects.

In VBA you use a "!" to delimit the field name to access the field information.

I guess I haven't found a method that is exposed to LISP.

The item property isn't avaiable using DAO like it is using ADO. I like the DAO methods because it accesses the file directly instead of having to use a link file (.udl) to access the database.

I have Scott Mcfarlanes book which has an example of accessing databases using ADO.

I was wondering if any of you had any other example.

Peter Jamtgaard

Ed Jobe
2004-07-26, 03:11 PM
In DAO you use the "Fields" property.

Ed Jobe
2004-07-26, 03:11 PM
Correction. That would be the Fields "collection".

peter
2004-07-26, 03:50 PM
Hi Ed,

I did finally find that the item property did work in the fields collection although it is not displayed. I have now a working routine that will import a mdb file into a list using the DAO DBengine mechanism. In a few days I will have it be able to reverse the process list to mdb file.

Peter Jamtgaard
www.waun.org <- take a look at this

Ed Jobe
2004-07-26, 04:54 PM
It is not displayed since it is the default method. I'm glad you got it working though.

peter
2004-07-27, 12:26 PM
I wonder why if you examine the ADO object model the item property is displayed but in the DAO model it is not.

Peter Jamtgaard

Ed Jobe
2004-07-27, 08:37 PM
I would say, because it is an older technology and programming standards have evolved since then. Typically, you would not use the Item method, just recordset.Fields("fieldname"). But since you're using lisp, you have to use the Item property. The previous syntax implements the Item method, but just isn't apparent. In fact, the syntax before that was recordset.Fields.Fieldname and was abandoned in favor of the more standard syntax. When a method is the default method for a class, it is not necessary to specify the method, e.g. Fields("fieldname") and Fields.Item("fieldname") both work. The documentation in the older DAO model probably just doesn't make this clear.

Ed Jobe
2004-07-27, 08:38 PM
BTW, for a collection object, the Item method should always be the default method.