|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Vice President / Director
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
#2 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In DAO you use the "Fields" property.
__________________
──□ Ed □── |
|
|
|
|
|
#3 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Correction. That would be the Fields "collection".
__________________
──□ Ed □── |
|
|
|
|
|
#4 |
|
Vice President / Director
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
#5 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
It is not displayed since it is the default method. I'm glad you got it working though.
__________________
──□ Ed □── |
|
|
|
|
|
#6 |
|
Vice President / Director
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
#7 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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 □── |
|
|
|
|
|
#8 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
BTW, for a collection object, the Item method should always be the default method.
__________________
──□ Ed □── |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Learning Lisp | Wolfgirl | AutoLISP | 37 | 2008-09-21 07:22 AM |
| LISP for Intersection Clean Up | zorroxxxx | AutoLISP | 13 | 2004-08-30 11:54 PM |
| Elevation Lisp? | gapple | AutoLISP | 0 | 2004-06-10 12:25 PM |
| Need Help w/ a lisp..... | smiller | AutoLISP | 2 | 2004-06-07 04:17 PM |
| database interface | nrenfro | Revit Architecture - General | 3 | 2004-01-12 05:38 PM |