asp.net - Is it possible to do identity insert/update in SubSonic 2.0 -


unfortunately i'm stuck using undocumented/obsolete library (subsonic 2.0). i'm trying simple identity insert can't seem work.

here's psuedo-code version of i'm trying do:

subsonicexampleobject o = new select()                           .from(subsonicexampleobject.schema)                           .where(subsonicexampleobject.idcolumn)                           .isequalto(124124)                           .executesingle<subsonicexampleobject>();  if(o == null) {     o = new subsonicexampleobject();     o.id = 124124;     o.save(); } 

i've tried adding code above , below statement, no success:

new inlinequery()     .execute("set identity_insert " + subsonicexampleobject.schema + " on");      [code above]  new inlinequery()     .execute("set identity_insert " + subsonicexampleobject.schema + " off"); 

regardless of do, subsonic seems ignoring id value, , setting based on next identity value.

if knows how this, i'd super duper happy!


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -