Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADOlisp ques.

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
182 Views, 2 Replies

ADOlisp ques.

Hey Gurus

Can one "insert into" an access table which has FORIEGN KEY Links to some fields using ADOlisp? Below is sql statement:

(setq SQLStatement (STRCAT "INSERT INTO SHEET" " (SHEET_LEADNO, SHEET_CABLETYPE_ID, SHEET_ACTIVECOND, SHEET_UNITA, SHEET_UNITB, SHEET_CONNECTORA, SHEET_CONNECTORB, SHEET_BACKSHELLA, SHEET_BACKSHELLB, SHEET_NO) VALUES ('" LN "','" CT "','" ac "','" una "','" unb "','" cona "','" conb "','" baka "','" bakb "','" page "')"))

If i break the link i can update table.

Thanks from

Southie
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

By "foreign key link" do you mean just the value of the primary key of a
row in another table, or something cool and Microsofty and proprietary?

If it's not something Microsofty you should be able to. But you do have to
supply values for all required fields that do not have a default value.

What's the structure of the table you are inserting into? Did you print out
the error message returned by ADOLISP_DoSQL? Did you triple check that all
your single and double quotes are in the right place? (It looks like at
least most of them are).

Sometimes it seems that Access insists on double quotes; you might try
replacing all single quotes with escaped double quotes (\").

In addition to any replies you might receive or already received, you may
find more information or responses by posting future connectivity related
questions in the following discussion group:

Web browser: http://discussion.autodesk.com/forum.jspa?forumID=16
Newsreader: news://discussion.autodesk.com/autodesk.autocad.connectivity

--
jrf
Autodesk Discussion Group Facilitator
Please do not email questions unless you wish to hire my services

On Wed, 8 Aug 2007 15:11:11 +0000, southie wrote:

> Hey Gurus
>
> Can one "insert into" an access table which has FORIEGN KEY Links to some
fields using ADOlisp? Below is sql statement:
>
> (setq SQLStatement (STRCAT "INSERT INTO SHEET" " (SHEET_LEADNO,
SHEET_CABLETYPE_ID, SHEET_ACTIVECOND, SHEET_UNITA, SHEET_UNITB,
SHEET_CONNECTORA, SHEET_CONNECTORB, SHEET_BACKSHELLA, SHEET_BACKSHELLB,
SHEET_NO) VALUES ('" LN "','" CT "','" ac "','" una "','" unb "','" cona
"','" conb "','" baka "','" bakb "','" page "')"))
>
> If i break the link i can update table.
>
> Thanks from
>
> Southie
Message 3 of 3
Anonymous
in reply to: Anonymous

Jon

Thanks for the reply. On further review problem was a data type mismatch. Gotta remember to utilize the error checker more. ADOlisp has opened many programming doors
for me and is greatly appreciated.

Southie

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost