Cannot update table--only does SQL insert

Hi,
just another newbie type of question.... i have a new window with its own 
table.  i'm doing a "copy from window to table" &c, and it works fine to 
insert data the first time.  however, i can tell from the SQL Profiler that 
when I try to modify the data, it does not do an update--it tries to do 
another insert (and of course, can't).  Is there something I should be 
setting in Dexterity somewhere to make the table updatable, or do I need to 
manage this with PassThroughSQL?

thanks in advance.
0
1/6/2005 3:21:01 AM
greatplains 29623 articles. 2 followers. Follow

2 Replies
560 Views

Similar Articles

[PageSpeed] 51

Table operations are covered in detail during the Dexterity Training, please 
contact your MBS Representative to register your interest in getting some 
training.

The problem you are having is because you do not have a passive lock on the 
record you are saving.

If you execute a save table command without applying a passive lock it will 
always attempt to create a new record and if it already exists it will 
produce a duplicate key error.  If you are not seeing the error, then either 
add a check error command after the save table or use err() to check for 
specific errors such as DUPLICATE or RECORDCHANGED.

To apply the passive lock you must use a change table command.  This will 
apply a passive lock if the record already exists so that it can be updated.  
Note: You must also use change table before using the remove table command.

Once a passive lock has been created, it must be released before attempting 
to lock another record in the same table, you must either use save table 
(Save), remove table (Delete) or release table (Cancel).

If you are creating a maintenance window, you must use change table when you 
first display an existing record.  If you just use get table, and then use 
change table just before you save, there will be no multi-user handling to 
check that two users have not updated the record at the same time.  In this 
situation whoever saves last will win.

Dexterity's passive locking will allow two users to update the same record 
at the same time as long as they don't update the same field. For example, 
User 1 can change the phone number while user 2 changes payment terms.... 
both changes will be saved.

Hope this helps.

David Musgrave [MSFT]
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"Programmer in So Cal" wrote:

> Hi,
> just another newbie type of question.... i have a new window with its own 
> table.  i'm doing a "copy from window to table" &c, and it works fine to 
> insert data the first time.  however, i can tell from the SQL Profiler that 
> when I try to modify the data, it does not do an update--it tries to do 
> another insert (and of course, can't).  Is there something I should be 
> setting in Dexterity somewhere to make the table updatable, or do I need to 
> manage this with PassThroughSQL?
> 
> thanks in advance.
0
dmusgrav1 (1325)
1/7/2005 2:07:02 AM
Thanks for your help.  I understand that that is the problem because if i do 
a "change table" right before my "Save" it does the SQL Update (i can see it 
in the Profiler).  However, I'm still having the problem.  I'm opening the 
file using "change table" at the beginning of one function (and I know it's 
locked because i tested it by trying to do "change table" again at the end of 
the function).  However, once I manipulate other data in the window, and (in 
another function, not that that matters), do a "copy from window to table" 
and "save table", it still has this problem, as if I lost the lock somewhere. 
 Is there anything else besides "save," "release" or "remove" that will do 
this to me?

Thanks.

"David Musgrave [MSFT]" wrote:

> Table operations are covered in detail during the Dexterity Training, please 
> contact your MBS Representative to register your interest in getting some 
> training.
> 
> The problem you are having is because you do not have a passive lock on the 
> record you are saving.
> 
> If you execute a save table command without applying a passive lock it will 
> always attempt to create a new record and if it already exists it will 
> produce a duplicate key error.  If you are not seeing the error, then either 
> add a check error command after the save table or use err() to check for 
> specific errors such as DUPLICATE or RECORDCHANGED.
> 
> To apply the passive lock you must use a change table command.  This will 
> apply a passive lock if the record already exists so that it can be updated.  
> Note: You must also use change table before using the remove table command.
> 
> Once a passive lock has been created, it must be released before attempting 
> to lock another record in the same table, you must either use save table 
> (Save), remove table (Delete) or release table (Cancel).
> 
> If you are creating a maintenance window, you must use change table when you 
> first display an existing record.  If you just use get table, and then use 
> change table just before you save, there will be no multi-user handling to 
> check that two users have not updated the record at the same time.  In this 
> situation whoever saves last will win.
> 
> Dexterity's passive locking will allow two users to update the same record 
> at the same time as long as they don't update the same field. For example, 
> User 1 can change the phone number while user 2 changes payment terms.... 
> both changes will be saved.
> 
> Hope this helps.
> 
> David Musgrave [MSFT]
> Senior Development Consultant
> MBS Services - Asia Pacific
> 
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
> 
> mailto:dmusgrav@online.microsoft.com
> 
> Any views contained within are my personal views and 
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties, 
> and confers no rights.  
> 
> 
> "Programmer in So Cal" wrote:
> 
> > Hi,
> > just another newbie type of question.... i have a new window with its own 
> > table.  i'm doing a "copy from window to table" &c, and it works fine to 
> > insert data the first time.  however, i can tell from the SQL Profiler that 
> > when I try to modify the data, it does not do an update--it tries to do 
> > another insert (and of course, can't).  Is there something I should be 
> > setting in Dexterity somewhere to make the table updatable, or do I need to 
> > manage this with PassThroughSQL?
> > 
> > thanks in advance.
0
1/8/2005 1:31:09 AM
Reply:

Similar Artilces:

Problem with Script Updating
I am using a script to update the “1099 Type” field for Master Vendor table. The script basically is a basic if-then statement. This script is run “Before Document Commit” and it’s not updating correctly, its flip-flopping the results. When the script is set to run Before Document Commit I have the “Destination mapping” field “1099 Type” set to “Use Script”. Script below: If SourceFields("Send 1099") = "N" Then DestinationFields("Options.1099 Type").Value = 1 Else DestinationFields("Options.1099 Type").Value = 4 End If I have also tried this s...

pivot table with dynamic base data
hiya, im trying to create a pivot table where I can change my base data (inserting or deleting rows of data) and still have this reflected in the pivot table. My solution was to use entire columns as my range for input to the pivotTable, but this means including blank rows which seems to muck up the calculations. I cant think how else i can allow for new rows to be added to the base data anyone got any ideas how to do this? thanks loads for your help! You can use a dynamic range as the source. There are instructions here: http://www.contextures.com/xlPivot01.html bb wrote: > hiy...

Error: Can't clean up the following tables: PriceLevel. 02-13-05
Hello all, using CRM 1.2 on a win2k3 server we get this error in the application event log: Source: MSCRMDeletionService Event ID: 5895 - Error: Can't clean up the following tables: PriceLevel. Category: none User: n/a Computer: our_exchange_server ooppps, I forgot, of course many thanks in advance for any tip! ...

updating sheets based on data in first sheet
Another payroll question, I have a workbook that contains 26 sheets, one for each bi-weekl payroll period. I would like to set it up so when i add a new employe the rest of the sheets also update automatically with that employee name and information. I have been able to acheive this to a limited degree using th =sheet1!a1 formula, but this only updates the info in the first cel and particularly the first column. I would like to acheive this using the first sheet, since at th end of the year I would like to be able to calculate ytd figure easily. Thank -- Message posted from http://www.Exc...

Update for MS Money 2005?
I have Money 2005. Is there an update to MS Money for Canadian users? Thanks in advance for any answers. We need a bit more information! Are you having problems with M2005 or is this just a post-Christmas/New Year random query when you are trying to get away from the in-laws? -- Regards Bob Peel, Microsoft MVP - Money For unofficial FAQs see http://money.mvps.org/ or http://umpmfaq.info/ I do not respond to any emails that I have not specifically asked for. "Daniel" <Daniel@discussions.microsoft.com> wrote in message news:E86EAB89-21DE-4505-ACAD-647278D736BD@microso...

Excel 2010 Slicer Connection / Pivot Table Problem
Working in Excel 2010 beta. I have two pivot tables created from different SSAS cubes. I have PowerPivot add in installed, but not using it for this project. The two pivot tables both share several similar dimensions. When I try to connect a given slicer to both pivot tables, the 2nd pivot table is not available in the "Pivot Table Connections" window. The only pivot table listed in the "Pivot Table Connections" is the one for which the slicer was originally created. All of the posts I've seen so far say that all the pivot tables in the workbook should appear...

Microsoft Update only updates Windows Defender
iacrosoft Update only updates Windows Defender - I have to use Belarc Advisor to get a list of missing updates, and then go to the Microsoft Download Center to search for the missing updates and download and install them one at a time. I have Windows XP Home SP3, with Microsoft Update set to automatic download - can anyone tell me why I do not get all the necessary upadtes? Is this a sudden, new problem? When was Automatic Updates last working? Can you update manually via http://windowsupdate.microsoft.com? Any chance you've got a beta build of WinXP SP3 installed? What...

Publisher 2007 and Microsoft Updates
I created a newsletter yesterday - everything fine - use Publisher all the time. Then an automatic update came down this morning and I can't open the file - it says "Publisher cannot open file" Other documents in Publisher are opening - any ideas? http://support.microsoft.com/kb/972566/ -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "Kim" <Kim@discussions.microsoft.com> wrote in message news:8754339B-99DC-4D09-83AD-6B34D8215274@microsoft.com... >I created a newsletter yesterday - everythin...

From temporary table to master table and then join this in junction table
Hello, I have imported two spreadsheets from excel to two temporary tables called "import_tbl_contract" and "import_tbl_products". I do this on daily basis and import many spreadsheets. I end up with these data: [import_tbl_contract] contract_number contract_title start_date end_date [import_tbl_products] product_number product_text price I now append these data to the following two tables: [tbl_contract] contract_id (PK) contract_title start_date end_date e.g. 1; Syringes and needles; 01-01-2010; 31-12-2010 [tbl_products] product_id ...

insert picture from scanner doesnt work anymore
Every other Microsoft product works except Publisher. Have reinstalled printer and Publisher and contacted HP with not help Scan your picture and save it in a folder, insert into Publisher. Did you seek a newer driver while you were at HP? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "dobr" <dobr@discussions.microsoft.com> wrote in message news:5D458581-7CEF-4235-B841-AB46C2ACBE37@microsoft.com... > Every other Microsoft product works except Publisher. Have reinstalled > printer and Publisher and contacted H...

Update question
Soory if this is the wrong place to ask this, but cannot find a NG proper to Windows 7. I currently run Windows Vista and am getting tired of Vista's decision to tell me that it is going to shut down in less than a minute. So have decided to upgrade to Windows &. I note that I can purchase an upgrade versiom for 64 quid from Amazon or an apparently full version of Windows 7 Home premium for 89 quid. My question is this - If I buy the upgrade version will I only be able to load it on a new PC in the future if I already have windows Vista installed? i.e For any future cl...

how do i stop tracking of edits (inserts initials)?
when i edit forwarded messages or replies (like for staffed packages), outlook always inserts my initials into the edited portion. As I am the proofer for must of the correspondence, I have to often make edits to the original emails but can't seem to turn of the tracked changes. I spend more time deleting the initials than making the edits. Well...you didn't specify what version of Outlook you're using but check Tools | Options | E-mail Options... -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com Author - The ...

Outlook 2003 died mysteriously after update
Setup in a nutshell... System: Lenovo T500 laptop OS: Vista Business SP1 32-bit Software: Office Outlook 2003 SP3 Problem... So I'm using this setup for over a year, everything OK. Yesterday I did two things and now Outlook dies (quietly, sans error message) immediately after startup. It show the splash screen, displays my inbox, and *poof* disappears. What I did earlier... 1. Windows Update installed: KB9766662, KB979306, KB979099, KB975929 2. At the same time, while searching for another program to uninstall I stumbled upon (and uninstalled) Windows LIVE Toolbar and...

How update entity in post update?
I created a handler for Update post callout for Opportunity. I want update some fields of the opportunity on the PostUpdate. However, if I call the Update method of CRMOpportunity in the PostUpdate I will create a recursive post callout. Can somebody help me? Thank you for pay attention []'s Vin�cius Pitta Lima de Ara�jo You need to check the OrigObjectXML field to see what fields were updated and then act appropriately. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On Wed, 4 Aug 2004 17:43:17 -0300, "Vin�cius ...

Cannot install update KB979906 for .NET Framework 1.1 SP1
Running : Windows XP media center edition SP3 Have tried installing KB979906 a few times and also downloaded update manually but cannot install this update. Receiving error 0x643.Is it safe to uninstall the .NET Framework 1.1 and re-install as possibly corrupt , without having to uninstall/re-install all other .NET frameworks 2 , 3 and 3.5 including the updates that go with them? .. Hello sherlockomes, you might want to look at the following kb article to see if this will help with the error 80070643. <http://windows.microsoft.com/en-US/windows-vista/Windows-Update-error...

Print record once, update Yes/No field verifiying print
I would like to print a group of records, then have a Yes/No field [Printed] updated in my Jobs table with an update query showing the records were printed. Then next time the report runs, In my query criteria I will test for True values on the Yes/No field. Then only the records with the Yes/No field marked No will print. Any suggestions? Thanks Tommyboy,there's more to this question than meets the eye. For an explanation of what's involved, see: Has the record been printed? at: http://allenbrowne.com/ser-72.html The article includes a free sample database that dem...

latest update too MSCFV2
Hi, I have MSCFV2 version 6.5.7825.0. Could someone inform me if this is the latest download? Looks like you have 6.5.7825.0 from 05/21/2006, but there is a newer version - 6.5.7831.0 from 06/01/2006. C. Smith Enso Technologies, Incorporated http://www.ensotech.com On Tue, 13 Jun 2006 04:25:02 -0700, Paul <Paul@discussions.microsoft.com> wrote: >Hi, > >I have MSCFV2 version 6.5.7825.0. Could someone inform me if this is the >latest download? Christopher Smith csmith@ensotech.com Enso Technologies, Incorporated http://www.ensotech.com Also - meant to post this in t...

putting data into multiple tables
Using Access 2002 and would like to enter data into form which will then send to fields in multiple tables and update them. Can this be done and how need basic explanation Why do you want to send the data to different Tables? If The Tables all belong to the same Database. ie you're not dealing with different back-end systems, you probably have a serious normalization problem. Data should normally only have to be in one table in a relational database. Pieter "Phillipa" <Phillipa@discussions.microsoft.com> wrote in message news:994354EC-1216-4EEB-9CA9-D9F0880B03C5@mic...

Dynamic Menu update
Hi All, I need to update a menu item dynamically, setting its SetCheck property to either true or false, based on a user operation. I am trying to do this from a custom function. Usually, the pCmdUI pointer is used. But how do I do it from another function? Thanks Your "other function" should change some setting. In your ON_UPDATE_COMMAND_UI handler, you should check that setting and call SetCheck as needed. -------------- Ajay Kalra ajaykalra@yahoo.com In addition to Ajay's response, this page may help you: http://msdn2.microsoft.com/en-us/library/6kc4d8f...

online updates for money2003(not updating)
Money gets its updates from spcomstock.com and the server has moved to a new site. The default site that money provides has to be changed. At this time I don't know how to do this. If I find out how to do this I will Post it. ...

Payroll Update
HI all, We are running GP 7.5. I installed SP7 and the July 2005 tax update for CDN payroll. Now out payroll administrator gets an error message: 'The modified version of P_Payroll registry is missing'. How do I fix this problem Thanks -- Henry ...

Multiple Pivot Tables?
Am I able to have two different pivot tables in the same worksheet? What I am doing is I made a timesheet and we have one pivot table that counts up the Service Type and sums the Time. I now want a separate pivot table that will give me the Job Number and the total time associated with that particular job. I can't seem to figure this out. Any help is greatly appreciated. THANK YOU! ...

Searching database for name of table or parts thereof?
Hi there, I have about 50 tables in my Access database. As you can imagine, it can be difficult to find specific tables. I would like to search all the tables for a table name or parts thereof. How can I do that? I looked for it, but could not come up with an approach. Thank you for your help. On Mar 3, 4:14=A0pm, FSPH <F...@discussions.microsoft.com> wrote: > I have about 50 tables in my Access database. As you can imagine, it can b= e > difficult to find specific tables. I would like to search all the tables f= or > a table name or parts thereof. http://databases.aspfa...

[ANN] Excel X security update
Hi All, A security update for Excel X was also released today: http://www.microsoft.com/mac/downloads.aspx?pid=download&location=/mac/d ownload/officex/ExcelX_Security_1017.xml&secid=5&ssid=17&flgnosysreq=Tru e Or at least: http://www.microsoft.com/mac/downloads.aspx Corentin -- --- Mac:MS MVP (Francophone) --- http://www.mvps.org - http://mvp.support.microsoft.com MVPs are not MS employees - Les MVP ne travaillent pas pour MS Remove "NoSpam" to e-mail me - Retirez "NoSpam" pour m'�crire ...

HOW ABOUT AN UPDATE?
Microsoft, can we get an update on the login issue please???? It's been a whole day since we heard from Russ last. Err, Russ sent 2 updates today. Subject line = "File Lock Update" Hope you can find them. "shan" <anonymous@discussions.microsoft.com> wrote in message news:6bef01c475b3$3e7d6ea0$a601280a@phx.gbl... > Microsoft, can we get an update on the login issue > please???? It's been a whole day since we heard from > Russ last. >-----Original Message----- Look again, he posted 2 yesterday, we are still waiting for something today...