Getting info from a Database

Getting info from a Database

Anonymous
Not applicable
261 Views
5 Replies
Message 1 of 6

Getting info from a Database

Anonymous
Not applicable
Good Evening

We have a database that has all of our parts and part info in it. I would
like to be able to populate a BOM by using accessing this parts list. Is
this possible? If it is what is teh best way to go about it, a LISP or by
using VBA?

Any info and even some good exapmles would be greatly appreciated.

Thanks
Chris
0 Likes
262 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Hi Chris,

Look in the sample files and you will find sample programs to do thses
things with VBA. For linking to external databases I am sure you will find
VBA far easier than lisp.


--


Laurie Comerford
CADApps
www.cadapps.com.au


"Chris Tellers" wrote in message
news:9E6C943935239AA7484C43F8D80A980B@in.WebX.maYIadrTaRb...
> Good Evening
>
> We have a database that has all of our parts and part info in it. I would
> like to be able to populate a BOM by using accessing this parts list. Is
> this possible? If it is what is teh best way to go about it, a LISP or by
> using VBA?
>
> Any info and even some good exapmles would be greatly appreciated.
>
> Thanks
> Chris
>
>
0 Likes
Message 3 of 6

Anonymous
Not applicable
Er, Autodesk provides CAO samples but not ADO samples, and he's more likely
to want ADO.

IMHO it's easiest to do in the language with which one is most comfortable;
admittedly, doing it form scratch in LISP would be pretty complex, but I
supply a free ADOLISP library (http://www.flmeing-group.com) that makes it
pretty straightforward.

--
jrf
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services

In article , Laurie
Comerford wrote:
> Hi Chris,
>
> Look in the sample files and you will find sample programs to do thses
> things with VBA. For linking to external databases I am sure you will find
> VBA far easier than lisp.
>
0 Likes
Message 4 of 6

Anonymous
Not applicable
You can use DAO as well, I'm more familiar with it than ADO, and I don't
want to learn it, here is an example:

Dim db as Database, rsProj as Recordset, RsClaim as Recordset
Dim sqlStr As String
Set db = OpenDatabase(PATH, False, False, "Dbase IV")
sqlStr = "SELECT * FROM Project ORDER BY no_projet"
Set rsProj = db.OpenRecordset(sqlStr, dbOpenDynaset)
Set rsClaim = db.OpenRecordset("claim", dbOpenDynaset)
While Not rsProj.EOF
FrmClaims.cmbProjets.AddItem rsProj("no_projet")
rsProj.MoveNext
Wend

Hope this helps.

"Chris Tellers" a écrit dans le message de
news:9E6C943935239AA7484C43F8D80A980B@in.WebX.maYIadrTaRb...
> Good Evening
>
> We have a database that has all of our parts and part info in it. I would
> like to be able to populate a BOM by using accessing this parts list. Is
> this possible? If it is what is teh best way to go about it, a LISP or by
> using VBA?
>
> Any info and even some good exapmles would be greatly appreciated.
>
> Thanks
> Chris
>
>
0 Likes
Message 5 of 6

Anonymous
Not applicable
Hi Joe,

Why would someone be more likely to want ADO than CAO ?

It is more likely that someone asking a question such as the original has
never heard of either ADO or CAO.

If there is supplied CAO code which will readily enables the design
requirements to be met, to me that would be an adeqaute reason to use it.

Swapping to ADO is not that difficult and you can do it with a relatively
small knowledge of ActiveX programming, but the only compelling reason at my
level of understanding would be that MS has announced it prefers ADO.

To someone with lisp knowledge I'm sure your tools would be highly valuable,
but in addition one has to overcome the limitations of the DCL file as well
as the general programming issues.


--


Laurie Comerford
CADApps
www.cadapps.com.au


"Jon Fleming" wrote in message
news:VA.00001382.08c7f51c@fleming-group.com...
> Er, Autodesk provides CAO samples but not ADO samples, and he's more
likely
> to want ADO.
>
> IMHO it's easiest to do in the language with which one is most
comfortable;
> admittedly, doing it form scratch in LISP would be pretty complex, but I
> supply a free ADOLISP library (http://www.flmeing-group.com) that makes it
> pretty straightforward.
>
> --
> jrf
> Member of the Autodesk Discussion Forum Moderator Program
> Please do not email questions unless you wish to hire my services
>
> In article , Laurie
> Comerford wrote:
> > Hi Chris,
> >
> > Look in the sample files and you will find sample programs to do thses
> > things with VBA. For linking to external databases I am sure you will
find
> > VBA far easier than lisp.
> >
>
>
0 Likes
Message 6 of 6

Anonymous
Not applicable
In article <0A17DE760AA97E8BBED09528E40C4132@in.WebX.maYIadrTaRb>, Laurie
Comerford wrote:
> Hi Joe,
>
> Why would someone be more likely to want ADO than CAO ?

Because CAO only works with AutoCAD labels, links, and link templates, whereas
ADO can do anything that can be done with a database. E.g. his case: given a
list of part numbers which appear in the current drawing and the pathname of a
database, how would you retrieve the descriptions of those parts with CAO?
IMHO it can't be done.

Is it possible that you are thinking of DAO (Data Access Objects) instead of
CAO (Connectivity Automation Objects, a proprietary Autodesk product)?

> It is more likely that someone asking a question such as the original has
> never heard of either ADO or CAO.

Certainly. Or DAO, for that matter.

> If there is supplied CAO code which will readily enables the design
> requirements to be met, to me that would be an adeqaute reason to use it.

If there's supplied any code which readily enables the design requirements to
be met, to me that would be adequate reason to seriously consider using it.
Maintainability and portability to future products are important factors.

> Swapping to ADO is not that difficult and you can do it with a relatively
> small knowledge of ActiveX programming, but the only compelling reason at my
> level of understanding would be that MS has announced it prefers ADO.

MS announced that it prefers ADO to DAO, years ago. DAO hasn't been updated
for a long time. It's a legacy technology. _If_ all other things are equal,
use ADO rather than DAO.

MS doesn't care about CAO, because CAO is a proprietary Autodesk product that
only works only with AutoCAD labels, links, and link templates.

> To someone with lisp knowledge I'm sure your tools would be highly valuable,
> but in addition one has to overcome the limitations of the DCL file as well
> as the general programming issues.

Oh, I agree 100%. However, for many people LISP is still the way to go.

--
jrf
Member of the Autodesk Discussion Forum Moderator Program
Please do not email questions unless you wish to hire my services
0 Likes