Good morning
I am strong on Access but weak on SQL
My problem is as follows:
1) I am upgrading an existing MS Access system which is not handling the load
2) I have created an Access DB front end
3) I have created an Access back end and imported all the data from the "old system"
4) All testing went according to plan without any issues - so the Access front end is OK when connected to the Access backend
5) The IT department created a SQL 2005 database
6) I exported each of the 163 tables in the backend to the SQL DB - each table has a primary key as the first field in SQL - I allowed SQL to create the field types - - there are no joins or relationships
7) After exporting the data I opened each of the tables and checked the data - all OK
8) User testing went OK for all the tables except for 3 - most of the tables are small but the 3 that failed all have more than 1200 records and multiple fields
9) All three tables are failing in the same place - the code that is failing works fine on 160 tables and I have been using the code in other applications for years
10) I cut the number of rows down to 800 for each of the tables and all works OK - as soon as I add the full data the error returns
11) I cannot put an error trace on the SQL DB myself - but it can be arranged by the IT department
This is the DAO code - all it does is open a Recordset on a SQL linked table, update a field to the current user name "John" and close the Recordset
Dim curr_db As Database
Dim curr_rs as Recordset
Dim hold_crit as Variant
Dim curr_rec as Long
Dim num_of_recs as Long
Set curr_db = DBEngine.Workspaces(0).Databases(0)
hold_crit = "SELECT * FROM t_broker where [broker_id] = 352"
Set curr_rs = curr_db.OpenRecordset(hold_crit, dbOpenDynaset, dbSeeChanges)
If curr_rs.RecordCount > 0 Then
curr_rs.Edit
curr_rs!cu = "John"
curr_rs.Update
endif
curr_rs.Close
The "curr_rs.Update" command will not execute - it just hangs - after 30 seconds the "ODBC - Call failed" error appears
The strange part is - if I step through the code using the F8 key there is no problem - why ?
If I put a 20 second "Sleep" command in after the "curr_rs.Update" command it works OK - but this is obviously not the way to fix it
Any help to get over this problem will be appreciated
Regards
Ken
I am strong on Access but weak on SQL
My problem is as follows:
1) I am upgrading an existing MS Access system which is not handling the load
2) I have created an Access DB front end
3) I have created an Access back end and imported all the data from the "old system"
4) All testing went according to plan without any issues - so the Access front end is OK when connected to the Access backend
5) The IT department created a SQL 2005 database
6) I exported each of the 163 tables in the backend to the SQL DB - each table has a primary key as the first field in SQL - I allowed SQL to create the field types - - there are no joins or relationships
7) After exporting the data I opened each of the tables and checked the data - all OK
8) User testing went OK for all the tables except for 3 - most of the tables are small but the 3 that failed all have more than 1200 records and multiple fields
9) All three tables are failing in the same place - the code that is failing works fine on 160 tables and I have been using the code in other applications for years
10) I cut the number of rows down to 800 for each of the tables and all works OK - as soon as I add the full data the error returns
11) I cannot put an error trace on the SQL DB myself - but it can be arranged by the IT department
This is the DAO code - all it does is open a Recordset on a SQL linked table, update a field to the current user name "John" and close the Recordset
Dim curr_db As Database
Dim curr_rs as Recordset
Dim hold_crit as Variant
Dim curr_rec as Long
Dim num_of_recs as Long
Set curr_db = DBEngine.Workspaces(0).Databases(0)
hold_crit = "SELECT * FROM t_broker where [broker_id] = 352"
Set curr_rs = curr_db.OpenRecordset(hold_crit, dbOpenDynaset, dbSeeChanges)
If curr_rs.RecordCount > 0 Then
curr_rs.Edit
curr_rs!cu = "John"
curr_rs.Update
endif
curr_rs.Close
The "curr_rs.Update" command will not execute - it just hangs - after 30 seconds the "ODBC - Call failed" error appears
The strange part is - if I step through the code using the F8 key there is no problem - why ?
If I put a 20 second "Sleep" command in after the "curr_rs.Update" command it works OK - but this is obviously not the way to fix it
Any help to get over this problem will be appreciated
Regards
Ken