Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-07-25, 02:23 PM   #1
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default DBEngine Database LISP Interface.

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
peter is offline   Reply With Quote
Old 2004-07-26, 04:11 PM   #2
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

In DAO you use the "Fields" property.
__________________
──Ed ──
Ed Jobe is offline   Reply With Quote
Old 2004-07-26, 04:11 PM   #3
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

Correction. That would be the Fields "collection".
__________________
──Ed ──
Ed Jobe is offline   Reply With Quote
Old 2004-07-26, 04:50 PM   #4
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default RE: DBEngine Database LISP Interface.

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
peter is offline   Reply With Quote
Old 2004-07-26, 05:54 PM   #5
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

It is not displayed since it is the default method. I'm glad you got it working though.
__________________
──Ed ──
Ed Jobe is offline   Reply With Quote
Old 2004-07-27, 01:26 PM   #6
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default RE: DBEngine Database LISP Interface.

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
peter is offline   Reply With Quote
Old 2004-07-27, 09:37 PM   #7
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

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 ──
Ed Jobe is offline   Reply With Quote
Old 2004-07-27, 09:38 PM   #8
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default RE: DBEngine Database LISP Interface.

BTW, for a collection object, the Item method should always be the default method.
__________________
──Ed ──
Ed Jobe is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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


All times are GMT +1. The time now is 02:36 PM.