I am working on J2ME Record Stores and when i delete the contents successfully, and then i check it, it gives me the correct count which is zero. But when i insert again, it gives me error finding record exception, because it is inserting after the content that i had inserted before. It is inserting from 2 instead of 1.
Can anyone explain why is it happening that way?
The record id in a recordstore is unique and auto-incrementing, just like a primary key in an SQL database. When 1 has been used, it cannot be used again. (Unless you delete the recordstore and create it again).
Related
I want to insert the data in a specific column of azure easy table with xamarin forms.i already insert the data in a row but some fields are empty and these can be fill later by the user when user want to update the record.
for example there is a table which name isUSER(User-id,UserName,Email,Password,Mobile-No) user enter all data except MobileNo and it may or may be entered first time but may enter later.if they enter mobile number later then how I do that ?
First of all , All CRUD are operated on the object in Azure easy table .If you create this record at the first time, You could insert this record to Azure easy table. If user want to add the mobile number in the next time, you could query this record, then delete the old data, put the new record to the table.
You could refer to following link.
https://officialdoniald.azurewebsites.net/2017/02/24/xamarin-forms-azure-easy-table-accsess/
If you want to know more basic knowledge, you can refer to the link below
https://blog.xamarin.com/getting-started-azure-mobile-apps-easy-tables/
I am getting an error while trying to insert a new record to a SQL table using the following code.
jdbcRowSet1.saveRow(objectData);
jdbcRowSet1.acceptChanges();
The issue is because of a trigger that fires after INSERT that tries to set a primary key value (Column name ID) with an auto generated ID (Column name ID_AUTO). Both columns are in the same table. If that trigger is deleted, the code works just fine.
Is there anything that can be done to the xpages code to avoid the error (The error says "1 conflicts while synchronizing"). The error happens at the acceptChanges() line.
EDITED:
I took care of the above mentioned issue. But now my next issue is getting the auto generated ID value back after inserting the new row. Please let me know if anybody knows.
I have the next problem to which I need help to solve.
There is a Workbook with three forms and a Database in Access.
There is a table in the DB called tblPlanungStatus where I record if a module is ready.
All three forms uses the table to either delete or insert a status into it.
There is an anomaly that occurs most of the time from Form3.
I insert the status, it runs without error. I run a query to count the recorords for this type and it comes back 1. Wich is good.
In the DB nothing happens, it shows no record added.
I run the query again and it says there is 1 record.
I run delete and the count says 0. So it seems to work. But in the DB still nothing.
I close the Workbook and run the count again and the record dissapeared, in the DB nothing shows.
If the record stays in the DB then when deleting it works, but after closing it comes back again.
Sometimes the record cannot be added, sometimes it cannot be deleted and when reopening the Workbook (which I don't know why matters) the record either deletes or adds.
In the DB the record appears and dissapears with a certain time, but not always.
I have been stuggling with this for over a week. Can anyone help me?
Thanks, Mike
Probably your Access database corrupted. Check this, especially "Number of records varies, depending how the data is sorted"
I know there are some other posts with almost the same title, but i couldn't find what i was looking for ...
First let me explain you what i am trying to do:
I need to upload a few hundred documents to sharepoint 2010 document library using a powershell script that is collecting data from an excel worksheet. Each document has many properties and 80% of them will be completed at the import time. The upload is working fine, but when i am trying to update each document properties, ... well, there are where the problems appeared.
The problem is that there are several lookup columns that i want to update, but some of them are not working ... I mean there are 3 lookup columns (single value) that are updating and 2 columns that are not updating. I am using internal name of the field for all of them and all lookup columns are indexed columns (because i am using the restricted delete behaviour).
I tried to delete the index of the column that is not updating, but this did not worked.
I tried to delete and recreate the column, but still not working.
I tried to use the id of the field or the display name, but still not working.
$Spfield=$Spfile.Item.Fields["MyLookupField"]
$Spfile.Item[$Spfield.ID]=($spweb.Lists["AnotherList"]).GetItemById($LookupIdValue)
$Spfile.item.Update()
It throws this exception:
Index operation failed; the array index evaluated to null.
The same exception for this: $Splistitem[$Spfield.ID]=$LookupIdValue.ToString()+";#"+$LookupValue
If I write this $Spfile.Item["Internal_x0020_Name"]=$lookupRegion I am receiving the following error message:
Unable to index into an object of type microsoft.sharepoint.splistitem
For this $Splistitem.Item("MyColumn")=$lookupRegion I was receiving this exception
Exception calling "set_item" with "2" arguments. The column 'MyColumn' does not exist. It may have been deleted by another user.
Any help would be gladly appreciated. Thank you in advance !
I have one table called: Transaction. This table has the following fields: (ID,ProductName,Amount,Date) placed in an excel sheet that is connected with MS Access database. ID is the only unique field. Sometimes, my user submits a transaction that has let's say 5 records. Then, they want to modify the submitted data in case if they entered incorrect amount and they want to correct it. I want to write a code in VBA that will do the update. my current query is:
Update table Transaction(ProductName,Amount) set ProductName=#Product,Amount=#Amount)
where Date=#date;
This query does not work fine because obviously it replaces all the records data with the data of the last resubmitted record because my condition is weak. My difficulty is that I can't find a good condition in the where clause that will do the update a record by record accordingly.
Please help,
You will need to use the unique id of the record, in your case the ID field to guarantee you are updating the correct record.
Something like the following:
Update table Transaction(ProductName,Amount) set ProductName=#Product,Amount=#Amount) where ID = "id of record you want to update"
Enjoy!