How to connect SQL Server Database From MS Access 2016 with dynamic Connection string like ADP? (1 Viewer)

mojtaba

New member
Local time
Today, 16:39
Joined
Sep 15, 2021
Messages
18
I have ADP project and I can use that only on lower than Office 2010

as far as I know "Cannot Convert ADP to Accdb" with this bad news, I decided to build my project from scratch in the new access version.
Now my problem is that ADP had a recordset that could very easily connect to the SQL Server database via a string connection.
I want to know if there is anyway close to ADP to do this in Access 2016?

Can anyone help ?

Thank you dear engineers for taking the time to ask this question
 

mojtaba

New member
Local time
Today, 16:39
Joined
Sep 15, 2021
Messages
18
I have ADP project and I can use that only on lower than Office 2010

as far as I know "Cannot Convert ADP to Accdb" with this bad news, I decided to build my project from scratch in the new access version.
Now my problem is that ADP had a recordset that could very easily connect to the SQL Server database via a string connection.
I want to know if there is anyway close to ADP to do this in Access 2016?

Can anyone help ?

Thank you dear engineers for taking the time to ask this question
PS : The following methods are not applicable at all compared to ADP :
- Link Table Manager
- OCDB
 

sonic8

AWF VIP
Local time
Today, 14:09
Joined
Oct 27, 2015
Messages
998
ADP had a recordset that could very easily connect to the SQL Server database via a string connection.
I want to know if there is anyway close to ADP to do this in Access 2016?
Instead of the built-in CurrentProject.Connection you can create your own ADO connection and execute any SQL against the backend server.
 

mojtaba

New member
Local time
Today, 16:39
Joined
Sep 15, 2021
Messages
18
Instead of the built-in CurrentProject.Connection you can create your own ADO connection and execute any SQL against the backend serve
Instead of the built-in CurrentProject.Connection you can create your own ADO connection and execute any SQL against the backend server.
ca you help me more ?
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 08:09
Joined
Apr 27, 2015
Messages
6,341
Instead of the built-in CurrentProject.Connection you can create your own ADO connection and execute any SQL against the backend server.
ADPs were gone by the time I got involved with Access and SQL Server. From the article on your website, they sound like something MS should have kept!
 

mojtaba

New member
Local time
Today, 16:39
Joined
Sep 15, 2021
Messages
18
ADPs were gone by the time I got involved with Access and SQL Server. From the article on your website, they sound like something MS should have kept!
ADP was power full project for prototype software that need SQL Server database and easy to use
 

sonic8

AWF VIP
Local time
Today, 14:09
Joined
Oct 27, 2015
Messages
998
How connect to SQL Server From Access project with dynamic connection string
You can create a replacement for the built-in CurrentProject.Connection using something like this:
Code:
Public Property Get ReplacementConnection() As ADODB.Connection

    Dim cn As ADODB.Connection
    Set cn = New ADODB.Connection
    cn.CursorLocation = adUseClientBatch
    cn.Open "YourConnectionStringGoesHere"

    Set ReplacementConnection = cn

End Property
 

Users who are viewing this thread

Top Bottom