Link to MS Access project

Link to MS Access project

Anonymous
Not applicable
347 Views
6 Replies
Message 1 of 7

Link to MS Access project

Anonymous
Not applicable
I need to activate forms in a MS Access Project (.adp) file through AutoCad
VBA, but can't figure out how to create the necessary link (.udl) file.

An .adp file is an Access front end to a SQL Server database back end. I had
no problems before I converted the back end to SQL from Access, but before
the conversions both the front and the back were simple Access (.mdb) files,
and the connections were easy.

Anyone know how to do this?

Thanks . . .
0 Likes
348 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Wouldn't it be easier to go directly to the SQL database?
0 Likes
Message 3 of 7

Ed__Jobe
Mentor
Mentor
Use the Data Sources widget in Control Panel>Administrative Tools to create the udl file. Just select the right provider and fill in the necessary info.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 4 of 7

Anonymous
Not applicable
You do not connect AutoCAD to ADP by using *.udl/Data Link Properties dialog
box.

ADP is merely a front end desktop application (as AutoCAD) and it does not
contain data. All data is in the backend SQL Server database.

The better way to manipulate data in SQL Server is directly go to the SQL
Server database from AutoCAD (I am sure you know there are quite a few
ways). If you do want to manipulate data through forms already designed in
ADP application (so you do not have to rewrite/redesign similar forms and
their logics), you can automate Access through ActiveX Automation. However,
I'd avoid this and go directly from AutoCAD to SQL Server database whenever
it is possible.


"Tony Burba" wrote in message
news:5421422@discussion.autodesk.com...
I need to activate forms in a MS Access Project (.adp) file through AutoCad
VBA, but can't figure out how to create the necessary link (.udl) file.

An .adp file is an Access front end to a SQL Server database back end. I had
no problems before I converted the back end to SQL from Access, but before
the conversions both the front and the back were simple Access (.mdb) files,
and the connections were easy.

Anyone know how to do this?

Thanks . . .
0 Likes
Message 5 of 7

Anonymous
Not applicable
Thanks all.

I go to SQL directly whenever possible, but what I need to do is activate
some Access forms that are in the Access front end, not the SQL database.

Anyway, I think I figured out how to create the connection I need.



"Norman Yuan" wrote in message
news:5421785@discussion.autodesk.com...
You do not connect AutoCAD to ADP by using *.udl/Data Link Properties dialog
box.

ADP is merely a front end desktop application (as AutoCAD) and it does not
contain data. All data is in the backend SQL Server database.

The better way to manipulate data in SQL Server is directly go to the SQL
Server database from AutoCAD (I am sure you know there are quite a few
ways). If you do want to manipulate data through forms already designed in
ADP application (so you do not have to rewrite/redesign similar forms and
their logics), you can automate Access through ActiveX Automation. However,
I'd avoid this and go directly from AutoCAD to SQL Server database whenever
it is possible.


"Tony Burba" wrote in message
news:5421422@discussion.autodesk.com...
I need to activate forms in a MS Access Project (.adp) file through AutoCad
VBA, but can't figure out how to create the necessary link (.udl) file.

An .adp file is an Access front end to a SQL Server database back end. I had
no problems before I converted the back end to SQL from Access, but before
the conversions both the front and the back were simple Access (.mdb) files,
and the connections were easy.

Anyone know how to do this?

Thanks . . .
0 Likes
Message 6 of 7

Anonymous
Not applicable
Ok, you can simply use automation, like this:

Dim acs as Access.Application
Set acs=New Access.Application
acs.OpenAccessProject("C:\.....\MyADP.adp")
acs.DoCmd.OpenForm "......"
....


"Tony Burba" wrote in message
news:5423289@discussion.autodesk.com...
Thanks all.

I go to SQL directly whenever possible, but what I need to do is activate
some Access forms that are in the Access front end, not the SQL database.

Anyway, I think I figured out how to create the connection I need.



"Norman Yuan" wrote in message
news:5421785@discussion.autodesk.com...
You do not connect AutoCAD to ADP by using *.udl/Data Link Properties dialog
box.

ADP is merely a front end desktop application (as AutoCAD) and it does not
contain data. All data is in the backend SQL Server database.

The better way to manipulate data in SQL Server is directly go to the SQL
Server database from AutoCAD (I am sure you know there are quite a few
ways). If you do want to manipulate data through forms already designed in
ADP application (so you do not have to rewrite/redesign similar forms and
their logics), you can automate Access through ActiveX Automation. However,
I'd avoid this and go directly from AutoCAD to SQL Server database whenever
it is possible.


"Tony Burba" wrote in message
news:5421422@discussion.autodesk.com...
I need to activate forms in a MS Access Project (.adp) file through AutoCad
VBA, but can't figure out how to create the necessary link (.udl) file.

An .adp file is an Access front end to a SQL Server database back end. I had
no problems before I converted the back end to SQL from Access, but before
the conversions both the front and the back were simple Access (.mdb) files,
and the connections were easy.

Anyone know how to do this?

Thanks . . .
0 Likes
Message 7 of 7

Anonymous
Not applicable
Oh.

Thank you.


"Norman Yuan" wrote in message
news:5423367@discussion.autodesk.com...
Ok, you can simply use automation, like this:

Dim acs as Access.Application
Set acs=New Access.Application
acs.OpenAccessProject("C:\.....\MyADP.adp")
acs.DoCmd.OpenForm "......"
....


"Tony Burba" wrote in message
news:5423289@discussion.autodesk.com...
Thanks all.

I go to SQL directly whenever possible, but what I need to do is activate
some Access forms that are in the Access front end, not the SQL database.

Anyway, I think I figured out how to create the connection I need.



"Norman Yuan" wrote in message
news:5421785@discussion.autodesk.com...
You do not connect AutoCAD to ADP by using *.udl/Data Link Properties dialog
box.

ADP is merely a front end desktop application (as AutoCAD) and it does not
contain data. All data is in the backend SQL Server database.

The better way to manipulate data in SQL Server is directly go to the SQL
Server database from AutoCAD (I am sure you know there are quite a few
ways). If you do want to manipulate data through forms already designed in
ADP application (so you do not have to rewrite/redesign similar forms and
their logics), you can automate Access through ActiveX Automation. However,
I'd avoid this and go directly from AutoCAD to SQL Server database whenever
it is possible.


"Tony Burba" wrote in message
news:5421422@discussion.autodesk.com...
I need to activate forms in a MS Access Project (.adp) file through AutoCad
VBA, but can't figure out how to create the necessary link (.udl) file.

An .adp file is an Access front end to a SQL Server database back end. I had
no problems before I converted the back end to SQL from Access, but before
the conversions both the front and the back were simple Access (.mdb) files,
and the connections were easy.

Anyone know how to do this?

Thanks . . .
0 Likes