• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

adolisp: collegamento a database access con windows 7 a 64 bit

  • Thread starter Thread starter acitano
  • Start date Start date

acitano

Guest
Bye to all,
I am what cyclically every 2 or 3 months breaks the boxes with the adolisp of fleming.
I have been developing for 6/7 months a visual-lisp program of topography and use successfully and many satisfactions the adolisp to interface me with a db of access 2007.Premetto that I tested the software on autocad 2010 in ita autocad 2012 ita on windows xp 32 bit and access 2007 and 2010 and never gave me problems.
my client has changed computers and put on windows 7 to 64 bit and uses autocad 2012 ita and office 2010 to 32 bit at this point I can no longer connect with the db, here is the error that gives me the lisp at the time of connection:
failed connection!
visual lisp message automation error. [Microsoft][Driver Manager
ODBC] Data source name not found and default driver not specified.

description [Microsoft][Driver Manager ODBC] nome origine dati non
trovato e driver predefinito non specificato.
helpcontext 0
helpfile
nativeerror 0
number -2147467259
sqlstate im002
source microsoft ole db provider for odbc drivers
nil
I've been banging my head on the wall for a week...:confused:
I tried to connect with the hand odbc driver by going to configure with the executable: c:\windows\siswow64\odbcad32.exe

but nothing

hi acitano
 
not using adolisp, I created a series of utilities in vlisp for connection to an external database. Although my connection is not on access 2007, I had to create the condition if the system was 32 or 64 bit because the only thing that changed was the driver.
It could be the same for you.
 
It's not exactly the same.
the driver change to use the 64-bit one I got it without the aolisp.

The syntax I used was this:

(setq adocn (vlax-create-object "adodb.connection"))
(setq adorst (vlax-create-object "adodb.recordset"))
(vlax-invoke-method
adoctrina
"open"
(strcat "driver={" driver "};server=" server ";database=" database)
user
password
-1
)

drivers, servers and databases are variables. You should try by replacing the variables in your possession.
 
this confutatis, and thank you in advance of your interest:
Let's see if I understand?
driver = microsoft access driver (*.mdb, *.accdb)
database= my file.accdb
user and pwd do not have

and how server what do I put on?
The name of the dll?
 
He could take it with this syntax.

(vlax-invoke-method
adoctrina
"open"
(strcat "provider = microsoft.jet.oledb.4.0;data source = c:\database.mdb")
"
"
-1
)

this worked with a local .mdb extension database
 
your "connectionstring" worked for old access versions now the new is:
Code:
 (strcat "provider=microsoft.ace.oledb.12.0;data source = c:\\database.mdb")
and it always worked in the last 6 months I also add that it works with windows 7 to 32 bit but not with the 64 version that is randomly what it takes to me.
there is a large documentation on the site connectionstring:http://www.connectionstrings.com/access-2007access files 2007 from what I could understand are of the same type as those for access 2010 and therefore there is no version conflict for access.
the mistake that always gives me that:
automation error. impossible to find the provider. It is possible that it is not installed correctly.
but question then is how to install correctly?
hi acitano
 
Of course I saw it, I tried to install and see what was going on in September 2011.
tells me to use:
microsoft.ace.oledb.14.0

I think it's too simple. . .
It's not going! is not so simple, I tried with 12.0 with 14.0 but nothing, except that I do not understand with this databaseengine what you install and where? and I don't know what and how a connection is configured, I tried the old way to search for the odbc configuration file that is now called odbcad32.exe and is in the dir c:\windows\syswow64
I can configure the db to search but still nothing, I discovered then another odbcad32.exe in the dir c:\windows\system32 makes me configure it but only with a mssql driver and I can not add that access
Mahh!
 
the fact is that in my operations I use an external database that is configured as a visa to the initial posts, simply changing only the 32 to 64-bit driver. the access (on 32-bit PC) I configured it only for the various tests carried out on local pc, unfortunately I can not tell you more, I'm sorry. . .
 
I was trying on the other pc equipped with windows 7 to 64 bit and access 2010 and the connection works as on the 32-bit pc. the string is the same:

(setq adocn (vlax-create-object "adodb.connection"))
(setq dbname "c:\\database1.accdb")
(vlax-invoke-method
adoctrina
"open"
(strcat "provider = microsoft.ace.oledb.12.0;data source = " dbname)
"
"
-1
)

and rightly returns me nil.

at this point, with the commands sql select, update, etc..., I extract what interests me.
 
Hello confutatis,
I also intersed with this connection with an external db.. .
I tried your string and gave me this mistake:

automation error. impossible to find the provider. it is possible
that it is not installed correctly.

What am I supposed to do? .

I was trying on the other pc equipped with windows 7 to 64 bit and access 2010 and the connection works as on the 32-bit pc. the string is the same:

(setq adocn (vlax-create-object "adodb.connection"))
(setq dbname "c:\\database1.accdb")
(vlax-invoke-method
adoctrina
"open"
(strcat "provider = microsoft.ace.oledb.12.0;data source = " dbname)
"
"
-1
)

and rightly returns me nil.

at this point, with the commands sql select, update, etc..., I extract what interests me.
 
Calm down, this is the string valid for a local database. from what I understood acitano had problems between 32 and 64 bits, but I have the impression that he too referred to an external database and not to a local one.
 
I'm sorry, I felt bad. .
...I tried it with an acces file placed in c on my hd....
And it gives me that mistake. .

bb
 
provider = microsoft.ace.oledb.12.0 also works on windows xp to 32bit, access 2003 and autocad 2007. I don't know what to say.
 
hello to confutatis and hi blubossa, sorry but I was a little busy on my other fronts despite, now here I am, in my work you have to jump from one project to another.
confutatis, also to me it works on win 7 to 32, without problems with the autocad combination and office configured in all possible versions and configurations, but unfortunately it is not the configuration of my client.
the proof that I will do today will be with autocad 2012 64 bit and office 64 bit, I believe and I strongly hope that it is the same as you tried with sucesso, this however will mean that I will have to force the customer to install buy office 64 bit as they now have only that to 32.

confutatis I will let you know in the day, and blubossa thanks also to you for the interest.
hi acitano
 
Hi.
I press that I never used access, and I barely have what a database is.
I am trying to use adolisp to read some database file access.mdb, in the example adolisp there is a database consisting of one table, my are composed of various tables, connects correctly but do not understand how to read the values rows and columns
someone could post a small example with a minimum explanation
Thank you.
 
Hi.
I try to better focus the question placed above,
I have a test.mdb file that contains 4 tables with 4 columns and 5 rows
I can connect the file
I can read the name of all tables
returns a list (("ta""tb""tc"td")

I can read column header
returns a list (("c1"c2"c3"c4"))

I can recover the complete list of data fields
or ( r1 r1 r1)(r2 r2 r2).....)
I
the question is:
if you want to extract only the first column data
I know the "c1" header?
Thank you.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top