Create record then update?

Results 1 to 2 of 2

Thread: Create record then update?

  1. #1
    Tobes Guest

    Default Create record then update?

    Hi,<BR><BR>In my ASP page I call 2 functions in turn, one to create a new record (executes an insert SQL statement), then another to update the newly created record (executes an update SQL statement). The problem is that the UPDATE function that doesn&#039;t always work, and I think it&#039;s because it&#039;s not seeing the newly created record due to being executed so quickly. Each function uses a different connection, and recordset. <BR><BR>Any ideas would be greatly appreciated.<BR><BR>Tobes

  2. #2
    Tobes Guest

    Default RE: Create record then update?

    Ok, in explaining the problem I found a kind of solution, although it&#039;s not totally adequate. <BR><BR>Basically, if I ensure that both functions use the same connection object for both the create and update statements, then the update function always looks at the table *after* the create statement has completed. <BR><BR>Thinking back to my database theory, I can&#039;t imagine that one connection should know anything about another, so trying to get 2 connections to perform their own operations in a desired sequence must be nigh on impossible, nomatter what locking mechanism is being used?<BR><BR>Feedback anyone?<BR><BR>Tobes

Posting Permissions

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