Hello all,
I try to work on a code based on an asnwer using MS Access file. Table Created but with empty records. What I am miss?
Code:
(setq fnam "D.MDB" ) ; <- modify fnam as needed
(setq support "c:\\program files\\autodesk\\autocad 2021\\acade\\support\\en-us\")
(if (setq hdl (wd_mdb_GetHandle 4)) ; <- autocad documentation doesn't cover this secret option
(progn
(if (wd_mdb_Create hdl fnam 1 support)
(progn
(wd_mdb_CreateTable hdl "A"
(list
(list "A" "S" 20) ; type = char string, field width = 20
(list "B" "S" 40)
(list "C" "S" 40)
(list "D" "S" 40)
(list "E" "A" 0)) ; type = autonumber
1 ; overwrite
support
)
)
)
(wd_mdb_Close hdl)
)
)
(if (setq hdl (wd_mdb_GetHandle 2))
(progn
(if
(wd_mdb_Open
hdl
fnam
)
(progn
(wd_mdb_AddRecs hdl "A"
(list
(list (list "A" "A1")(list "B" "B1")(list "C" "C1")(list "D" "D1"))
(list (list "A" "A2")(list "B" "B2")(list "C" "C2")(list "D" "D2"))
)
)
)
)
(wd_mdb_Close hdl)
)
)
(wd_mdb_closeall)