Can't update or delete newly edited records in a Form (ADP)

FuzMic

DataBase Tinker
Local time
Tomorrow, 06:12
Joined
Sep 13, 2006
Messages
744
Continuing my series - the Struggle in climbing the ADP learning curve in upsizing from .MDB

Situation
1 A form working "perfectly" in .MDB is upsized to link to an SQL2k table that has unique keyfield.
2 Some adjustment were made to the SQL-Jet queries if necessary to meet SQL2k requirements.
3 After adding a new record, deletion of that new record is not allowed: error 107 (application defined or
object defined error). New record can be deleted after closing and reopening form.
4 Similarly after editing a non key field on the same form, once accepted, it can't be edited again error 7787 (..blank..error info)

What's really happening?? Help :cool:
 
Panting up the slope....

Thanks Hartman

I will certainly follow your suggestion as i am really facing many, many problems with the forms after the upsizing.

For this particular issue after some tinkering i found the cause. During upsizing, it converted the text datatype to nvarchar and therefore any criteria involving this will require an N infront eg <> N '30' not just <> '30'. Once done the forms is happy with the recordsource in the form.

Have searched the Knowledge base in Ms & got 128808 Optimizing for Client/Server Performance article plus links. Also read the .mdb vs .adp front end comparision. I see alot of advantages in my applet using your suggestion though, just a few questions:
1 Will the mdb be slower because of the ODBC layer in between?
2 Do you think that in Access 2007, Ms is moving away from .adp and if so what they are suggesting instead?

Meanwhile have tried a few things on your lead and i seem to be able to see the light at the end of the tunnel. Looking forward to a more gentle slope as I need SQL for multi-user environment.

Anyway thanks again.:)
 
Last edited:
Hartman, Thanks for the KNOW reassurance.

Currently i am already flying with the forms in the new .mdb created from the existing accounting .mdb with some changes specific to SQL language. Thanks to you.

Meanwhile i imagine a few more hurdles to jump, namely:
1 Housekeeping issues: To use osql/sqlcmd by way of Shell, text files or Stored Procedure to backup/restore, shrink, etc.
2 Create new company accounts by SQL script or Restore/Rename of a sample .mdf.
3 Tinker with the use of SQLDMO Reference to access the Server using VBA codes.

Will appreciate any advice on the above so that I can soar faster. I KNOW Bridge Players do have the right tricks even though i am not one of you. Thanks again. Cheers!!:)
 
Not to be the great defender of ADPs (as they're not a preferred technology of mine either - I've hardly ever used them really) but I don't think we can state, as if fact, that they're a dead end quite yet.
Sure we all have our preferences, mine also lie with MDBs. And it's very true in that ADPs haven't been advanced feature-wise, and are less obviously visibile under 2007 - but the fact remains they have not been (and there's no official indication from MS that they are due to be at any specified date) deprecated.

They were bug fixed and updated in Acc2007 - just receiving no new features. Indications are this will continue.
Eventually yes I do believe they will come to an official end, naturally - everything will ;-) But yes I do believe that whatever successor of MDB/ACCDB we have in years to come will outlast the ADP. (Hopefully by many years! :-)
But there are developers (I can think of one MVP off the top of my head) who are still dedicated to their use.
I wouldn't say they're dead. I wouldn't say they're dying. I'd say they're not feeling very well though. <g>

It isn't exactly fair to say that moving to ACCDB has affected ADPs though really. The change in file format (to what is the immediate successor of Jet) is exclusive of the ADP. The Jet engine was never present at all in ADPs previously - and the ADE isn't present still and so has no role in supporting them.
MS had stated that they would not change the Jet MDB format again - so when changes were needed in Jet they kinda had no choice but to move format (and file name). ADPs weren't so constrained - had there even been any advancements the change in file format (and hence name) wouldn't have been relevant or required. (ADP's are all FE development tool anyway - by definition).

One of the things about Access (and what I prefer about the MDB/ACCDB format) is the number of choices is offers.
So - sticking with ADP or not there's generally a way to battle through.
If you're not long into your trek into ADPs and you're more comfortable with MDBs (and DAO in particular) then it might indeed be worth your time to revert while there's no great loss to your time investment.

As Pat says - just because you're using linked tables and passthroughs - doesn't mean you can't still leverage ADO. It can easily be used in an MDB to offer effectively the same direct server execution of commands as an ADP.
Indeed since 2007 has scrapped ODBCDirect support from DAO - I feel ADO is at least as important as ever - despite MS's attempts to subtly steer away from it again.

As Pat also says though Passthroughs - even as they stand as read only, parameterless queries - are a very powerful part of Access.
Efficient and versatile. Though they can't accept parameters directly in the sense that native Jet queries can - the standard methodology when working with SQL Stored Proc executions which require parameters (or even just dynamic T-SQL) is to very simply alter the SQL source of the passthrough at runtime before executing them (or even just creating them on the fly).

And yes - SQLDMO is just as usable from an MDB/ACCDB. It's just another library to reference.
 
Much appreciate to both of you for yr thoughts & time. LPurvis, I truly enjoy your amusing thoughts mushroomed from Pat's 'dead end' plus your 'not too well' and a shot at POOR$$$ Ms ..'subtly steering away'. God bless all of us, mortals.

LPurvis, the reasons why i leap into Pat's path are
1. The existing accounting FEnd Applet (.mdb) uses linked .mdbs at the WorkStn for reporting after pulling data from the BEnd depend on the needs of each user. The issue was a linked .mdb is not a straight updatable recordset unless there is further twitching; correct me if i am wrong or is there another way out.
2. As it is an accounting Applet, i need a 2nd link to a common BEnd table that shows all the multi-companies with their respective database in the SQL. A question then arises, how to have a 2nd link to another database with the SQL; do i disconnect the link to the Co's dbase, then connect to multi-Co table to select co, finally link to the target database. If I use a BE .mdb for the multi-co table, the question of updatable recordset again pops up.
3. The learning curve even for a .mdb takes time as the documentation by Ms is diverse with the rapid change in tech. I am basically a DOS Paradox user and Access 2002/3 is my first attempt to move along as a mountain turtle.

The bottom line from both of your views, i think the path suggested by Pat is definitely more comfortable for a novice like me. Moreover age does not allow me to keep up with the continous changes. Any comments to above will however broaden my awareness to the usage of .adp.

Meanwhile for Pat, item 2: The Applet allows user to choose the type of company eg service vs manufacturing wherein a new .mdf needs to be created from a model. I was thinking of using a Restoration with a renaming of the model or use the SQL script like the one in NorthwindCS.sql


One final issues (i hope) that need some pointers
The BEnd .mdf have table relationships that need addressing at the FEnd .mdb in terms of error codes, cascading delete, etc. From what i read TRIGGERS are the way to go; is that so. Just a quick response, how to communicate with Triggers (both ways) from a .mdb.

Thanks again for the good company. Cheers!:)
 
I think i might been have miscommunicated on my earlier reply. All 3 items refer to a situation wherein after upsizing from a FE .mdb, i faced the 3 issues in the new .adp; in which case would your views, again 1-3, apply to the .adp. I certainly agree that an .mdb can do all that but can a .adp does the same?

On triggers: my imaginary plan with the FE .mdb was to create triggers within the SQL2k, then use RAISEERROR that i hope to retreive from the FE forms. Does this plan work?

On tiny question: Why can't codes for Recordsource be used in the Open Form module instead of using a Query?
 
Last edited:
Thanks for yr response.
U have put the final nail on "so crippled" .adp. I must admit i am really exhausted trying to link to .mdb, 2nd sql, visFoxPro, etc to get a updateable query.
 
What's yr hind side view on using SQL Srv as BE to address multi-user constraints as projected by Msoft.
 
If I might just pipe up again (as it's daytime here ;-) in answer to your question:
"What's yr hind side view on using SQL Srv as BE to address multi-user constraints as projected by Msoft."

I don't think it's fair to lump the relative failure of ADPs in as any kind of relfection of use of SQL Server as a back end.
It was, and still is, the suggested upsize path from a Jet BE.
Obviously Oracle, DB2 etc.. exist as alternatives - but the often quoted line that SQL Server is "Access'" Big Brother has merit (though not necessary as much weight as it implies).

When the confines of Jet are reached - SQL Server is still the logical choice. Even with the deminishing ADP presence (which was never very large anyway) there are still those who predict a future without JET (/ADE or whatever it becomes) and Access merely as a FE to SQL Server.

I personally think that's not likely - certainly not in the near future (MS have put real work into the ADE - and continue to do so).
But if it did happen - it wouldn't necessarily be the end of the (Access) world.
But a shame none the less - and another introduction of a limitation. (The big reason I prefer MDBs to ADPs is the local database engine - and Jet can be soo good when it's used within its confines).

But confines it does have. And having SQL Server there as a very appropriate alternative only helps to lend weight to case for Access as a viable solution choice. (Despite the naysayers!)

There are many developers who only ever use SQL Server as a BE to Access. (And we're not necessarily talking ADPs here).
 
Great cheers from Leigh.
I have a feeling that Pat is happy with SQL Srv as he is linking to them as well from the .mdb as stated in his earlier posting.
Loyalty is important. haha
Michael
 
Pat, Very reassuring views.. Thanks
I think i'll move on to face the SQL Server challenge in another thread. Hope to see you guys there. Cheers!
 

Users who are viewing this thread

Back
Top Bottom