accvbalearner
Registered User.
- Local time
- Yesterday, 18:58
- Joined
- Jan 3, 2013
- Messages
- 42
Hello out there, need some advice on a query that has been giving me fits.
I have a SQL Backend and an Access 2016 (*.accdb) Front End.
I have a table in SQL with 24 rows.
I have a table in Access with a few thousand rows.
There are two common fields in both tables [HOP1] & [HOPD], both tables have the [HOP1] field entered.
The SQL table has [HOPD] entered complete also. I want to add the [HOPD] from the SQL table into the Access table using an Update Query in Access.
The query looks like this in SQLView from Access:
UPDATE SQLTbl INNER JOIN ACCTbl ON SQLTbl.HOP1 = ACCTbl.HOP1
SET ACCTbl.HOPD = [SQLTbl].[HOPD]
WHERE (((ACCTbl.HOPD) Is Null));
When I try to run the above it takes about 15 to 20 minutes before I just give up, the Running Query bar at the bottom just keeps starting over.
So I opened SQLTbl in Access, copied and pasted it into a new table in Access and ran the same query using both tables above physically in Access and it worked in less than one second!
WHAT IS THE ISSUE? This same behavior is happening all of the time between SQL and Access and it ONLY occurs when:
1) Trying to add data from a form in Access into a Table in SQL
2) When trying to run an Update Query in Access to update an SQL Table with an Access Table or Query Source or an SQL Table - the tables are in the exact same SQL database!
3) Trying to run an Update Query to update an Access Table with an SQL Table
The only time things work ok is:
A) If I write a Pass-through query, All query returns are superfast, just a few seconds. Update queries are real fast, they're finished by the time I move the mouse off of the Run button. But requires me to load everything into the SQL database, because I don't know how to pass Access Table, Query or Form data to the SQL Database
B) Opening a SQL Table/View in Access
C) Running a report in Access that has NO Calculations in Access. If I do a calculation in the Access Report, it lags a 10-15 seconds on output. If I put the calculation in a SQL View then it is an almost immediate report from Access.
I have MSSQL Server 2008 Enterprise and Office365 MSAccess 2016.
At the beginning, all of my databases were in *.mdb format and I was using the SQL Native Client Driver with a DSNLess Connection. I updated the SQL Server 2008 to the latest SPs, etc. and changed the DSNLess connection to use SQL Server Native Client 11.0 and things really sped up on A, B and C above but 1, 2 & 3 still stink.
Any Ideas on what I am doing wrong?
Thanks in advance for any advice you have to offer!
I have a SQL Backend and an Access 2016 (*.accdb) Front End.
I have a table in SQL with 24 rows.
I have a table in Access with a few thousand rows.
There are two common fields in both tables [HOP1] & [HOPD], both tables have the [HOP1] field entered.
The SQL table has [HOPD] entered complete also. I want to add the [HOPD] from the SQL table into the Access table using an Update Query in Access.
The query looks like this in SQLView from Access:
UPDATE SQLTbl INNER JOIN ACCTbl ON SQLTbl.HOP1 = ACCTbl.HOP1
SET ACCTbl.HOPD = [SQLTbl].[HOPD]
WHERE (((ACCTbl.HOPD) Is Null));
When I try to run the above it takes about 15 to 20 minutes before I just give up, the Running Query bar at the bottom just keeps starting over.
So I opened SQLTbl in Access, copied and pasted it into a new table in Access and ran the same query using both tables above physically in Access and it worked in less than one second!
WHAT IS THE ISSUE? This same behavior is happening all of the time between SQL and Access and it ONLY occurs when:
1) Trying to add data from a form in Access into a Table in SQL
2) When trying to run an Update Query in Access to update an SQL Table with an Access Table or Query Source or an SQL Table - the tables are in the exact same SQL database!
3) Trying to run an Update Query to update an Access Table with an SQL Table
The only time things work ok is:
A) If I write a Pass-through query, All query returns are superfast, just a few seconds. Update queries are real fast, they're finished by the time I move the mouse off of the Run button. But requires me to load everything into the SQL database, because I don't know how to pass Access Table, Query or Form data to the SQL Database
B) Opening a SQL Table/View in Access
C) Running a report in Access that has NO Calculations in Access. If I do a calculation in the Access Report, it lags a 10-15 seconds on output. If I put the calculation in a SQL View then it is an almost immediate report from Access.
I have MSSQL Server 2008 Enterprise and Office365 MSAccess 2016.
At the beginning, all of my databases were in *.mdb format and I was using the SQL Native Client Driver with a DSNLess Connection. I updated the SQL Server 2008 to the latest SPs, etc. and changed the DSNLess connection to use SQL Server Native Client 11.0 and things really sped up on A, B and C above but 1, 2 & 3 still stink.
Any Ideas on what I am doing wrong?
Thanks in advance for any advice you have to offer!