Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
GuitarLover
Posts: 27
Registered: ‎01-26-2005
Message 1 of 7 (356 Views)

ADOLISP ADO-AttDB returns Can't connect dialog

356 Views, 6 Replies
07-14-2011 02:09 PM

** I originally posted this in the ASE forum, but moved it here since it applies to AutoLisp.

 

Hi,

I am trying out ADOLISP. When I enter ADO-AttDB?, a dialog says:

Can't connect the the database using "Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\InstallCAD\acad\Databases\ADO Lisp\AttDB Test.mdb"
logging as "admin" with password ""?

I checked to make sure the .mdb file exists in said folder.

Maybe the SQL driver? If so, how do I check that?

I'm on XP SP3, autocad 2004

Please help.

Thanks,
Chris


ADN Support Specialist
Marat.Mirgaleev
Posts: 37
Registered: ‎05-25-2011
Message 2 of 7 (336 Views)

Re: ADOLISP ADO-AttDB returns Can't connect dialog

07-20-2011 09:41 AM in reply to: GuitarLover

Hi Chris,

 

   I'd suggest to try the same connection string from a different program, like Excel etc.

   If you system is 64-bit, it also can be the source of the problem.



Marat Mirgaleev
Developer Technical Services
Autodesk Developer Network
Active Contributor
GuitarLover
Posts: 27
Registered: ‎01-26-2005
Message 3 of 7 (327 Views)

Re: ADOLISP ADO-AttDB returns Can't connect dialog

07-20-2011 12:00 PM in reply to: Marat.Mirgaleev

Marat,

 

Thanks for your response.

 

I am using 32-bit XP SP3.

 

I am a total noob. If I do your suggestion in Excel, can I use vba? Would you give me a quick example?

 

Also, what will this step tell me?

Valued Mentor
gasty1001
Posts: 482
Registered: ‎04-11-2010
Message 4 of 7 (324 Views)

Re: ADOLISP ADO-AttDB returns Can't connect dialog

07-20-2011 02:02 PM in reply to: GuitarLover

Hi,

 

Check this web site: http://www.connectionstrings.com/

 

-gnb

Mentor
southie
Posts: 291
Registered: ‎03-15-2007
Message 5 of 7 (313 Views)

Re: ADOLISP ADO-AttDB returns Can't connect dialog

07-20-2011 05:55 PM in reply to: GuitarLover

This works for me.

 

(setq fnd (getfiled "Select a Database" "c:\\yourdatabasepath\\" "mdb" 0));choose your .mdb file
(setq ConnectString (strcat "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" fnd ";Persist Security Info=False"))

 

hth

Southie

ADN Support Specialist
Marat.Mirgaleev
Posts: 37
Registered: ‎05-25-2011
Message 6 of 7 (303 Views)

Re: ADOLISP ADO-AttDB returns Can't connect dialog

07-21-2011 02:00 AM in reply to: GuitarLover

Hi,

 

   Yes, VBA would be fine.

   If the connection string does NOT work in Excel, that means that you have a problem: - with the connection string itself; - or with your database file; - or with the database driver.

   If it works in Excel, it will mean that the problem is with AutoCAD and Lisp.

 



Marat Mirgaleev
Developer Technical Services
Autodesk Developer Network
Distinguished Contributor
petervose
Posts: 309
Registered: ‎10-02-2003
Message 7 of 7 (271 Views)

Re: ADOLISP ADO-AttDB returns Can't connect dialog

08-09-2011 02:03 AM in reply to: Marat.Mirgaleev

Could it simply be that you need the double-backslash in your file path?

 

ie.     C:\\InstallCAD\\acad\\Databases\\ADO Lisp\\AttDB Test.mdb

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.