473,385 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Edit record in cross table query

4
Greetings,

I`m having a curious situation in MS Access 2003 while editing records in a cross table query.

Tables are:
Table1 (field1_1, field1_2, field1_3)
Table2 (field2_1, field2_2, field2_3)

field1_1 and field2_1 are key (id, autonumeric) fields

Fields field1_2, field1_3, field2_2, field2_3 are varchar(512)

The Query is:

Expand|Select|Wrap|Line Numbers
  1. Select field1_1, field1_2, field1_3, field2_1, field2_2, field2_3 from Table1 inner join Table2 on Table1.field1_1 = Table2.field2_1
The tables are in a SQL 2008 server and the MSAccess file is a project linked to the SQL Database using classic ODBC.

In the beginning I can't edit any record from the output. Later, when I sort the output (button A->Z in access) any varchar field in any record could be edited.

Any clue?

Thank you, best regards!

P.
Oct 21 '11 #1
8 2004
patjones
931 Expert 512MB
I'm replying in order to subscribe to the thread. I'm not really sure what could cause this but am interested to hear what other experts might have to say.

I don't think the sort order should have anything to do with whether the query is read-only or editable. A curious thing indeed.

Pat
Oct 21 '11 #2
NeoPa
32,556 Expert Mod 16PB
Bizarre behaviour. I have no idea how such a set of circumstances could come about.

Your explanation is very clear (more so than the vast majority of questions), but could you just run through the scenario again and check that everything you're doing and see matches everything you've described precisely. Let us know if there is any variation from what you've already explained.

It sounds like you've simplified the situation for the purposes of explanation. This needn't be a problem (and often makes sense) but it can lead to mistakes creeping in if the utmost care isn't taken. I'm sure you're naturally careful and precise, but if you wouldn't mind double-checking we may get a clue somewhere.
Oct 21 '11 #3
PAuser
4
Greetings,

I checked again. In fact my post is lot more simplified than reality, but facts are parallel. The field where I try to edit is a text field varchar(512) without any function, calculation, conditional or else in the source query.

As I said, when you open the view you can't edit this field. You can write there after ordering or filtering the data in the resulting view with Access tools (right click or sorting button on toolbar).

...the funny thing is, that this situation is with Access 2003. When I play the same in Office 2010, sorting makes no trick. I can edit the field in Office 2010 only after filtering. Welcome to the twilight zone! =)
Oct 24 '11 #4
NeoPa
32,556 Expert Mod 16PB
Simplifying is fine, as long as you test that what you have simplified it to exhibits exactly the same characteristics. Simply assuming it does rather misses the point of asking for help in the first place (I don't know that you have, but I'm inferring from your comments this may be a possibility). If you understood the whole situation well enough to be able to make that call reliably then we wouldn't be here in the first place (That's not an insult at all. Simply stating incontrovertible logic which bears no reflection on you personally).

You stated in your first post that you were talking about a Cross Table query. Did this simply refer to a query where multiple tables are joined together, or was it a reference to a Cross-tab type query?

In your latest post you refer to a view. Should this have been a query? Or are we dealing with SQL Server Views (That wasn't mentioned earlier)? Terms are not irrelevant. Using one term instead of the correct one can lead to misunderstandings and waste of effort.

I hope that some of these questions reveal some clues as, for now, I see nothing that might explain the behaviour you describe. Nor can I imagine any scenario where a subsequent sorting of a query would change it from non-updatable to updatable. That certainly seems weird. In case you haven't already explored this, let me point you to Reasons for a Query to be Non-Updatable. If nothing else it can tell you whether to expect the query to be updatable or not.
Oct 24 '11 #5
PAuser
4
Greetings Pat, Neo,

None insults taken, don't worry; I agree on your observations, specially about that terms are not irrelevant and simplifications could mask the source of the error. I confirm the simplified approach matches the described behavior. The first thing we made was to verify all the details in the page "Reasons for a Query to be Non-Updatable".

The query is written in the Access file. This file has all the objects referenced (linked); that means tables, views, procedures are available for Access, but they're native SQL. The view that is having this weird behavior is written in Access.

My curiosity comes from the fact that just by sorting (office 2003) or by filtering (office 2003/2010), I can edit the data in the table. I didn't expect that.

This is in no way stopping the job of my colleagues, it's just annoying to get support calls every day because our users forget this subtle detail in our application. In the end, they can filter the set of data for the form or sort it before editing.

I appreciate your interest and your help, have a nice day!

Best regards,

P.
Oct 25 '11 #6
NeoPa
32,556 Expert Mod 16PB
Just as a thought, and I'm not quite sure whether you want the data to be updatable or the reverse, but you could try forcing it to be non-updatable by setting the Recordset Type property of the form to Snapshot.

Otherwise, I have to agree with you that it appears to be quite weird behaviour.
Oct 25 '11 #7
PAuser
4
Greetings Pat, Neo,

Yes, the idea is to edit the data in a Form. The workaround we choose is to add a sorting after Form loads.

I appreciate your interest and your help, have a nice day and thank you very much!

Best regards,

P.
Nov 2 '11 #8
NeoPa
32,556 Expert Mod 16PB
Fair dos P. It's still a bit of an anomaly then, but at least you have handled it adequately for the database :-)
Nov 2 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ralph Freshour | last post by:
I'm not sure the follow multiple table query is the right way to do what I need to do although it seems to be working: $php_SQL = "SELECT * ". "FROM basics, personal, photos ". "WHERE...
0
by: Gianfranco | last post by:
Hi I got a problem with 2 tables. I have a table, say A, with x records, coming from a make table query and a table, say B, with y records, coming from another make table query. I need to join...
1
by: PMB | last post by:
Thank you in advance for any and all assistance. I'm trying to use a make table query to pull the last transactionID, so I can use an append query to reset the transactionID to the next...
1
by: Rob Woodworth | last post by:
Hi, I'm having serious problems getting my report to work. I need to generate a timesheet report which will contain info for one employee between certain dates (one week's worth of dates). I...
1
by: tom taol | last post by:
table1(fDate1,fMoney1) table2(fDate2,fMoney2) i want to following, group per month until current day, below. fMonth fMoney1Sum fMoney2Sum 1 1000000 ...
1
by: Darsin | last post by:
Hi, I have three tables with there fields given in brackets: User: (PK), Divisions: (PK), DivisionsOfUsers: , the "DivisionsOfUsers" tables has many-to-many relationships between userid...
10
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this...
1
by: alex.gruenther | last post by:
I am new to Access and need help creating an edit record form. I've got a table called Player with attributes like name, address, phone, etc. I've created an edit player form with a combo box...
5
by: Cyrax1033 | last post by:
I have yet a new issue that is the only factor stopping me from adding on the last feature to the database; all help is very much appreciated! In my database is are two tables: one for inserting...
0
by: Neven Huynh | last post by:
Hi Everyone, Here i my LINQ query to get record in Table Menu with condition are parentID == 0(get root menu) and ID != (parentID list) (which is parent ID list is are id of menu record that have...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.