Anyone successfully using SERIAL? I am having a problem since it seems DbLinq 
code calls the sequence twice, and when it happens, the serial gets incremented 
again. When I insert the first record to a table, the serial is set to 1, 
however the object returned by DbLinq tells me the serial is 2.

I traced the problem to Upsert in QueryRunner.

First:
  int rowsCount = dbCommand.Command.ExecuteNonQuery();

  "INSERT INTO public.session (sessionid) VALUES 
(nextval('session_sessionid_seq'))" // <- first increment

Next:
  // the second reads output parameters

  SqlStatement "SELECT nextval('session_sessionid_seq')" // <- second increment?

Then commit: 

  dbCommand.Commit();

The SELECT statement should somehow need to be changed to currval instead of 
nextval.

- Sami

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to