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

ADOLISP ADO-AttDB returns Can't connect dialog

6 REPLIES 6
Reply
Message 1 of 7
ChrisVillan
631 Views, 6 Replies

ADOLISP ADO-AttDB returns Can't connect dialog

** 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

Tags (1)
6 REPLIES 6
Message 2 of 7

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
Message 3 of 7

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?

Tags (2)
Message 4 of 7
hgasty1001
in reply to: ChrisVillan

Hi,

 

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

 

-gnb

Message 5 of 7
southie
in reply to: ChrisVillan

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

Message 6 of 7

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
Message 7 of 7
petervose
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

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

Post to forums  

Autodesk Design & Make Report

”Boost