to :> balletchick

Results 1 to 3 of 3

Thread: to :> balletchick

  1. #1
    Random, it worked! Guest

    Default to :> balletchick

    I created a test table and got it to work.<BR>1)Question, I already have two other fields that have to be PK, and I will need to add the IDENTITY field, does that matter?<BR><BR>2)I create the INSERT SQL dynamically, so should I just hard code the ID=@@IDENTITY into it, and should I just put an update after it? <BR><BR>3)How does this approach help with the cuncurency issues?<BR><BR>Thank you,

  2. #2
    BalletChick Guest

    Default RE: to :> balletchick

    1) Yes, can be difficult updating/changing a PK. Why do they NEED to be PK?<BR><BR>2) The @@IDENTITY query MUST come after the insert, and cannot be combined with the insert. That is the &#039placeholder&#039 concept I mentioned to you.<BR><BR>3) It eliminates them.<BR><BR>

  3. #3
    random Guest

    Default RE: to :> balletchick

    1)I have company id and userid as pk, they hit off other tables.<BR>2)What I do is a form submit create a loop R.F to collect data from form and put into array(i). <BR>Inside the same loop I proces array data, make ajustments, and based on hidden field that tells what table the data goes into I create a dynamic SQL string, futher down i execute the string. <BR><BR>Q1) I have a problem now because the user id is already in the array(i) so when I get down to the part where the dynamic sql string to insert is executed I cant make the change.<BR><BR>Q1a)So should I do a select for the Identity ID right before creating the dynamic SQL string is created?<BR>Will this affect concurreny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts