logo
down
shadow

How to set Application.CurrentProject.Connection in ACCDB project?


How to set Application.CurrentProject.Connection in ACCDB project?

By : user2952350
Date : November 19 2020, 12:41 AM
wish of those help As far as I know, in a standard Access database application (not an ADP) you can manipulate your connection(s) in only these ways:
Delete linked tables and recreate those links using code. If you do this correctly you can link/relink to any valid data source. This has no affect though on any ADO connections. Linked tables actually use a combination of DAO and ODBC as the data access layers. Create an ADO connection object as a global variable in a code module. Write functions to change its connection when you want to switch data sources. (You could also wrap all this in a class.)
code :


Share : facebook icon twitter icon
Access 2003 via Citrix: 'Error Loading DLL' with CurrentProject.Connection

Access 2003 via Citrix: 'Error Loading DLL' with CurrentProject.Connection


By : Samskeyti14
Date : March 29 2020, 07:55 AM
should help you out Problem was due to the Citrix server not having the latest Jet Service Pack for Access.
Why do VBA CurrentProject.Connection statements cause all my access databases to crash?

Why do VBA CurrentProject.Connection statements cause all my access databases to crash?


By : Yasir Ali
Date : March 29 2020, 07:55 AM
it should still fix some issue The code you showed us was very basic ADO, so it's hard to believe the code itself is the cause of the problem. Check whether the problem is isolated to that one machine by trying the same code from another machine. If it runs without error there, mostly likely the original machine is broken somehow. Unfortunately trying to find and fix the breakage can be challenging. Good luck!
Currentproject.connection works without linked tables?

Currentproject.connection works without linked tables?


By : user2197645
Date : March 29 2020, 07:55 AM
This might help you currentproject.Connection in .mdb points to this .mdb itself. Not to linked tables! When you had have linked tables in your .mdb your code established connection to this .mdb and pulled data from linked table reference placed there. When you deleted linked table from .mdb your code establishes connection to .mdb but can not find table(as you have deleted it).
Connection string for linked table is stored in .Connect property:
code :
CurrentDB.TableDefs("Customers").Connect
What is the difference between using currentproject.connection vs connection strings for ADO object?

What is the difference between using currentproject.connection vs connection strings for ADO object?


By : Gonzalo Guzzardi
Date : March 29 2020, 07:55 AM
wish helps you CurrentProject.Connection is a pre-initialized and ever present connection to the current Access database.
Connections using ODBC connection strings, OLEDB connection strings or ODBC DSNs, however, can connect directly to external data sources, reducing overhead and using the SQL dialect, options and quirks of the external system.
Getting insertID using currentproject.connection

Getting insertID using currentproject.connection


By : user3381510
Date : March 29 2020, 07:55 AM
will help you SELECT @@identity is a special query in Access. You can't use it with a FROM clause. Remove that and the query will work:
code :
rs.Open "SELECT @@identity AS locationID", cn
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org