View Complete Post
I am making use of SharePoint List Batch Updating methodology in order to update the items in bulk. I build the query dynamically for each and every item using StringBuilder and process the data ultimately using 'ProcessBatchData' Method.
Now, I have a requirement where I have to increment a particular field value in the query while iterating through each item for building the query. How can I auto-increment a field value for each item in the batch query?
hi everyone ...
i was given a form in which empid is varchar and i m supposed to auto increment it using a function and calling it ....
i have never done this. plz help me out the way .
i'm a newbee, so maybee a simple question
i have a parent table, with , lets say an id, and another field
i have another table, the child table which uses the id of the parent, for the master-detail relation.
the id is defined as datatype int, allow nulls = no, unique = yes, primary key = yes, identity=true, identityIncrement=1, identitySeed=1
so the id is auto incremented.
i am using ado.net and have a SqlCeDataAdapter, and SqlCeCommand to set InsertCommand
when inserting data and calling the Update() method of the SqlCeDataAdapter, reload the table, i see a nice id.
but, before the table is updated, the Id field is empty, and i would like to see what the id is, because i have also a child table which uses this id.
so, how can i see the id, or how can i add the values to the child, and use a reference (the id or something else) before updating the table ? or is it better to use another technique. I would like to work with the dataset because the data is loaded in memory,
and will not save everytime the changes.
if you know some nice samples, please let me know.
thanks ! andy
Can you please show me what is the syntax to add an increment column to Select Query? There will be additional column which goes 1,2,3 ... n.
I have a standard document library that I'm adding documents to. I would expect that the 'ID' property to auto-increment by 1 each time I upload a document, but the column is being incremented by 5. Is this a setting I can change somewhere to
have it increment by 1 instead? Thanks.
After i delete a row and then insrt a new row the auto increment row wont assign the correct next number , for example i have
1 last first
2 last first
3 last first
4 last first
i need some help fixing this, any help would be great thanks
I have stored procedure where i am creating table and setting primary key how to set auto increment ?
set @sql =@sql + 'CONSTRAINT [PK_'+@Table+'] PRIMARY KEY CLUSTERED ([ID] ASC)) ON [PRIMARY]'
Thanks for any idea
Im looking to take an auto-incremented Id#, CaseID, and insert that generated number into CaseID Columns in several other tables in that DataBase. It was suggested to me to either use @@Identity, or SCOPE_IDENTITY(). I am not sure which one is most appropriate to my situation nor do I have the knowledge to make either of them work at the moment. Was wonder what will be the best method to do this process. I am using C# and asp.net 4. Some code that i have so far:
DataSource on first page that will auto generate the id:
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
InsertCommand="INSERT tblDemographics (Facility, Review, Quarter, PCN, Program, MR, DOB, Gender, SOC, Discharge, Reference, Diagnostic)
VALUES (@Facility, @Review, @Quarter, @PCN, @Program, @MR, @DOB, @Gender, @SOC, @Discharge, @Reference, @Diagnostic)
SELECT @CaseID = SCOPE_IDENTITY()"
<asp:Parameter Name="Facility" />
<asp:Parameter Name="Review" />
<asp:Parameter Name="PCN" />
<asp:Parameter Name="Program" />