# Adding / Inserting records to SQL database

**URL:** <https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064>\
**Category:** WinForms\
**Created:** [February 20, 2010, 2:03pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064 "2010-02-20T14:03:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesPerrins](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/8c91f0/32.png) [@JamesPerrins](https://community.thinkgeo.com/u/JamesPerrins)\
**Post date:** [February 20, 2010, 2:03pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/1 "2010-02-20T14:03:48Z")

</div>

Hi,

I've&nbsp;seen&nbsp;this&nbsp;[gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6019/afv/topic/Default.aspx&nbsp;](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6019/afv/topic/Default.aspx)and&nbsp;the&nbsp;and&nbsp;the&nbsp;track&nbsp;and&nbsp;edit&nbsp;shapes&nbsp;example&nbsp;-&nbsp;but&nbsp;feel&nbsp;I&nbsp;may&nbsp;be&nbsp;missing&nbsp;some&nbsp;basic&nbsp;understanding&nbsp;here.

I&nbsp;want&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;retrieve,&nbsp;add&nbsp;new&nbsp;objects&nbsp;and&nbsp;edit&nbsp;existing&nbsp;objects&nbsp;in&nbsp;a&nbsp;SQL&nbsp;database&nbsp;in&nbsp;a&nbsp;multi&nbsp;user&nbsp;environement.

**Overall&nbsp;appraoch**

  
&nbsp;&nbsp;&nbsp;&nbsp;- I'm&nbsp;happy&nbsp;displaying&nbsp;the&nbsp;polygons.
  
&nbsp;&nbsp;&nbsp;&nbsp;- I&nbsp;can&nbsp;select&nbsp;a&nbsp;polygon&nbsp;clicking&nbsp;with&nbsp;the&nbsp;mouse&nbsp;-&nbsp;highlight&nbsp;it&nbsp;and&nbsp;return&nbsp;its&nbsp;ID
  
&nbsp;&nbsp;&nbsp;&nbsp;- To&nbsp;edit&nbsp;it&nbsp;I&nbsp;was&nbsp;planning&nbsp;on&nbsp;copying&nbsp;a&nbsp;selected&nbsp;polygon&nbsp;to&nbsp;the&nbsp;TrackOverlay&nbsp;layer&nbsp;and&nbsp;then&nbsp;edit&nbsp;here&nbsp;before&nbsp;copying&nbsp;it&nbsp;back&nbsp;to&nbsp;the&nbsp;main&nbsp;layer&nbsp;and&nbsp;saving&nbsp;-&nbsp;is&nbsp;this&nbsp;sensible&nbsp;?&nbsp;&nbsp;the&nbsp;posting&nbsp;above&nbsp;seems&nbsp;to&nbsp;copy&nbsp;all&nbsp;objects&nbsp;into&nbsp;the&nbsp;TrackOverlay&nbsp;layer&nbsp;-&nbsp;is&nbsp;that&nbsp;sensible&nbsp;with&nbsp;1000's&nbsp;of&nbsp;objects.&nbsp;&nbsp;I&nbsp;was&nbsp;worried&nbsp;that&nbsp;that&nbsp;would&nbsp;double&nbsp;the&nbsp;memory&nbsp;required.
  
&nbsp;&nbsp;&nbsp;&nbsp;- Adding&nbsp;a&nbsp;new&nbsp;record&nbsp;is&nbsp;similar&nbsp;-&nbsp;write&nbsp;to&nbsp;the&nbsp;TrackOverlay&nbsp;layer&nbsp;and&nbsp;then&nbsp;copy&nbsp;to&nbsp;the&nbsp;database&nbsp;layer
  

  

Is&nbsp;this&nbsp;a&nbsp;sensible&nbsp;approach&nbsp;?&nbsp;&nbsp;Are&nbsp;there&nbsp;alternative&nbsp;methods&nbsp;?

**Multiuse&nbsp;issues**

gis.thinkgeo.com/Support/Dis...fault.aspx

David&nbsp;explains&nbsp;in&nbsp;the&nbsp;aboe&nbsp;thread&nbsp;how&nbsp;generally&nbsp;all&nbsp;the&nbsp;spatial&nbsp;objects&nbsp;are&nbsp;held&nbsp;in&nbsp;memory&nbsp;until&nbsp;a&nbsp;commit&nbsp;is&nbsp;applied&nbsp;-&nbsp;so&nbsp;presumably&nbsp;I&nbsp;/&nbsp;the&nbsp;user&nbsp;will&nbsp;have&nbsp;control&nbsp;over&nbsp;this&nbsp;-&nbsp;and&nbsp;I&nbsp;can&nbsp;see&nbsp;this&nbsp;is&nbsp;a&nbsp;sensible&nbsp;way&nbsp;to&nbsp;go&nbsp;a&nbsp;lot&nbsp;of&nbsp;the&nbsp;time.&nbsp;&nbsp;The&nbsp;potential&nbsp;risk&nbsp;here&nbsp;if&nbsp;much&nbsp;editing&nbsp;is&nbsp;going&nbsp;on&nbsp;is&nbsp;that&nbsp;a&nbsp;record&nbsp;may&nbsp;be&nbsp;updated&nbsp;by&nbsp;another&nbsp;user&nbsp;before&nbsp;I&nbsp;commit&nbsp;-&nbsp;presumably&nbsp;SQL&nbsp;server&nbsp;controls&nbsp;this&nbsp;in&nbsp;the&nbsp;normal&nbsp;ways&nbsp;-&nbsp;the&nbsp;issue&nbsp;of&nbsp;course&nbsp;being&nbsp;that&nbsp;drawing&nbsp;a&nbsp;new&nbsp;shape&nbsp;is&nbsp;potentially&nbsp;significantly&nbsp;more&nbsp;time&nbsp;consuming&nbsp;than&nbsp;editing&nbsp;a&nbsp;record.

As&nbsp;SQL&nbsp;Server&nbsp;implements&nbsp;row&nbsp;level&nbsp;locking&nbsp;-&nbsp;presumably&nbsp;there&nbsp;is&nbsp;a&nbsp;risk&nbsp;that&nbsp;I&nbsp;might&nbsp;get&nbsp;a&nbsp;conflict&nbsp;if&nbsp;another&nbsp;user&nbsp;has&nbsp;simply&nbsp;edited&nbsp;a&nbsp;text&nbsp;based&nbsp;portion&nbsp;of&nbsp;the&nbsp;record&nbsp;?&nbsp;&nbsp;I'm&nbsp;jsut&nbsp;wondering&nbsp;if&nbsp;anyone&nbsp;has&nbsp;practical&nbsp;experience&nbsp;of&nbsp;this&nbsp;and&nbsp;possible&nbsp;good&nbsp;methods&nbsp;(e.g.&nbsp;if&nbsp;you&nbsp;get&nbsp;a&nbsp;conflict&nbsp;do&nbsp;a&nbsp;field&nbsp;by&nbsp;field&nbsp;comparison&nbsp;-&nbsp;and&nbsp;force&nbsp;an&nbsp;update&nbsp;of&nbsp;just&nbsp;changed&nbsp;fields&nbsp;-&nbsp;or&nbsp;keep&nbsp;the&nbsp;spatial&nbsp;objects&nbsp;in&nbsp;a&nbsp;separate&nbsp;table&nbsp;to&nbsp;reduce&nbsp;the&nbsp;risk&nbsp;?&nbsp;&nbsp;I'm&nbsp;open&nbsp;to&nbsp;any&nbsp;good&nbsp;suggestions&nbsp;!

**Editing&nbsp;interface**

Using&nbsp;theTrackOverlay&nbsp;(is&nbsp;there&nbsp;another&nbsp;way&nbsp;to&nbsp;edit&nbsp;?)&nbsp;-&nbsp;I&nbsp;can&nbsp;draw&nbsp;a&nbsp;new&nbsp;polygon&nbsp;/&nbsp;edit&nbsp;the&nbsp;nodes&nbsp;of&nbsp;an&nbsp;existing&nbsp;one.&nbsp;&nbsp;I've&nbsp;discovered&nbsp;I&nbsp;can&nbsp;add&nbsp;new&nbsp;nodes&nbsp;by&nbsp;clicking&nbsp;and&nbsp;dragging&nbsp;on&nbsp;the&nbsp;line.&nbsp;&nbsp;Deleting&nbsp;nodes&nbsp;is&nbsp;by&nbsp;double&nbsp;clicking&nbsp;on&nbsp;a&nbsp;node&nbsp;(this&nbsp;discovered&nbsp;from&nbsp;a&nbsp;throw&nbsp;away&nbsp;comment&nbsp;in&nbsp;a&nbsp;forum&nbsp;post&nbsp;-&nbsp;is&nbsp;there&nbsp;some&nbsp;documentation&nbsp;I've&nbsp;missed&nbsp;somewhere?)

  
&nbsp;&nbsp;&nbsp;&nbsp;- Are&nbsp;there&nbsp;other&nbsp;"magic"&nbsp;keys&nbsp;/&nbsp;methods&nbsp;e.g.&nbsp;for&nbsp;undo&nbsp;/&nbsp;copying&nbsp;/&nbsp;merging&nbsp;objects&nbsp;etc&nbsp;-&nbsp;or&nbsp;do&nbsp;I&nbsp;need&nbsp;to&nbsp;dvelop&nbsp;this&nbsp;myself
  
&nbsp;&nbsp;&nbsp;&nbsp;- I've&nbsp;discovered&nbsp;I&nbsp;can&nbsp;still&nbsp;use&nbsp;the&nbsp;zoom&nbsp;in&nbsp;box&nbsp;whilst&nbsp;editing&nbsp;-&nbsp;which&nbsp;is&nbsp;nice&nbsp;-&nbsp;but&nbsp;can&nbsp;I&nbsp;zoom&nbsp;out&nbsp;?
  

  

Sorry&nbsp;for&nbsp;all&nbsp;the&nbsp;questions!

Best&nbsp;wishes

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 21, 2010, 1:51am UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/2 "2010-02-21T01:51:21Z")

</div>

James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Hope&nbsp;my&nbsp;following&nbsp;answers&nbsp;can&nbsp;give&nbsp;you&nbsp;some&nbsp;help&nbsp;even&nbsp;thought&nbsp;it&nbsp;may&nbsp;not&nbsp;complete.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Overall&nbsp;approach&nbsp;  
&nbsp;I&nbsp;think&nbsp;we&nbsp;can&nbsp;achieve&nbsp;this,&nbsp;I&nbsp;think&nbsp;you&nbsp;do&nbsp;not&nbsp;need&nbsp;to&nbsp;consider&nbsp;SQL&nbsp;server&nbsp;as&nbsp;a&nbsp;very&nbsp;special&nbsp;data&nbsp;source,&nbsp;just&nbsp;think&nbsp;it&nbsp;as&nbsp;the&nbsp;same&nbsp;way&nbsp;as&nbsp;Shape&nbsp;file,&nbsp;try&nbsp;to&nbsp;do&nbsp;it&nbsp;in&nbsp;shape&nbsp;file&nbsp;and&nbsp;the&nbsp;others&nbsp;is&nbsp;almost&nbsp;the&nbsp;same.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Editing&nbsp;interface&nbsp;  
&nbsp;I&nbsp;think&nbsp;the&nbsp;magic&nbsp;keys&nbsp;can&nbsp;be&nbsp;implemented&nbsp;by&nbsp;our&nbsp;self,&nbsp;we&nbsp;already&nbsp;have&nbsp;an&nbsp;sample&nbsp;for&nbsp;this:&nbsp;  
&nbsp;[code.thinkgeo.com/projects/show/cancelingtrack](http://code.thinkgeo.com/projects/show/cancelingtrack)&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![JamesPerrins](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/8c91f0/32.png) [@JamesPerrins](https://community.thinkgeo.com/u/JamesPerrins)\
**Post date:** [February 21, 2010, 4:07am UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/3 "2010-02-21T04:07:42Z")

</div>

Yale,

Thanks&nbsp;for&nbsp;the&nbsp;reply&nbsp;-&nbsp;I'm&nbsp;sure&nbsp;what&nbsp;I'm&nbsp;after&nbsp;is&nbsp;possible&nbsp;-&nbsp;but&nbsp;I&nbsp;was&nbsp;hoping&nbsp;for&nbsp;some&nbsp;guidance&nbsp;as&nbsp;to&nbsp;whether&nbsp;I&nbsp;was&nbsp;approaching&nbsp;it&nbsp;the&nbsp;best&nbsp;way.

1)&nbsp;Specifically&nbsp;-&nbsp;all&nbsp;your&nbsp;edit&nbsp;examples&nbsp;seem&nbsp;to&nbsp;use&nbsp;the&nbsp;TrackOverlay&nbsp;-&nbsp;is&nbsp;this&nbsp;the&nbsp;only&nbsp;place&nbsp;I&nbsp;can&nbsp;do&nbsp;edits&nbsp;?

i.e.&nbsp;if&nbsp;I&nbsp;want&nbsp;to&nbsp;edit&nbsp;an&nbsp;exisitng&nbsp;polygon&nbsp;in&nbsp;a&nbsp;layer&nbsp;-&nbsp;do&nbsp;I&nbsp;need&nbsp;to&nbsp;move&nbsp;that&nbsp;polygon&nbsp;to&nbsp;the&nbsp;TrackOverlay&nbsp;layer&nbsp;to&nbsp;edit&nbsp;and&nbsp;then&nbsp;put&nbsp;it&nbsp;back&nbsp;at&nbsp;the&nbsp;end&nbsp;(this&nbsp;seems&nbsp;to&nbsp;work&nbsp;-&nbsp;but&nbsp;I&nbsp;was&nbsp;wondering&nbsp;if&nbsp;there&nbsp;was&nbsp;a&nbsp;better&nbsp;way).&nbsp;The&nbsp;sample&nbsp;example&nbsp;dealing&nbsp;with&nbsp;editing&nbsp;doesn't&nbsp;seem&nbsp;to&nbsp;give&nbsp;an&nbsp;example&nbsp;of&nbsp;editing&nbsp;a&nbsp;real&nbsp;object&nbsp;-&nbsp;just&nbsp;ones&nbsp;created&nbsp;on&nbsp;the&nbsp;fly&nbsp;-&nbsp;hence&nbsp;my&nbsp;slight&nbsp;confusioon.

2)&nbsp;As&nbsp;for&nbsp;"magic"&nbsp;keys&nbsp;/&nbsp;actions&nbsp;-&nbsp;I'm&nbsp;aware&nbsp;that&nbsp;I&nbsp;missed&nbsp;the&nbsp;drag&nbsp;zoom&nbsp;box&nbsp;initially,&nbsp;only&nbsp;found&nbsp;the&nbsp;add&nbsp;new&nbsp;node&nbsp;beacuse&nbsp;it&nbsp;was&nbsp;similar&nbsp;to&nbsp;other&nbsp;software&nbsp;I&nbsp;have&nbsp;used&nbsp;-&nbsp;and&nbsp;only&nbsp;found&nbsp;the&nbsp;delete&nbsp;node&nbsp;by&nbsp;double&nbsp;click&nbsp;because&nbsp;of&nbsp;a&nbsp;forum&nbsp;post.&nbsp;&nbsp;I'm&nbsp;wondering&nbsp;if&nbsp;I&nbsp;have&nbsp;missed&nbsp;some&nbsp;overview&nbsp;documnet&nbsp;describing&nbsp;such&nbsp;things&nbsp;(the&nbsp;only&nbsp;help&nbsp;I&nbsp;have&nbsp;found&nbsp;was&nbsp;auto&nbsp;generated&nbsp;describing&nbsp;classes&nbsp;etc).&nbsp;&nbsp;If&nbsp;there&nbsp;isn't&nbsp;such&nbsp;a&nbsp;document&nbsp;-&nbsp;it&nbsp;seemed&nbsp;likely&nbsp;to&nbsp;me&nbsp;that&nbsp;there&nbsp;may&nbsp;be&nbsp;other&nbsp;"out&nbsp;the&nbsp;box"&nbsp;functionality&nbsp;taht&nbsp;I&nbsp;was&nbsp;simply&nbsp;unaware&nbsp;of&nbsp;?

3)&nbsp;SQL&nbsp;server&nbsp;-&nbsp;OK&nbsp;-&nbsp;I&nbsp;accept&nbsp;once&nbsp;the&nbsp;data&nbsp;is&nbsp;displayed&nbsp;editing&nbsp;is&nbsp;no&nbsp;different&nbsp;from&nbsp;shapes&nbsp;-&nbsp;apart&nbsp;from&nbsp;the&nbsp;multi&nbsp;user&nbsp;issue&nbsp;(which&nbsp;I&nbsp;think&nbsp;does&nbsp;need&nbsp;to&nbsp;be&nbsp;handled&nbsp;-&nbsp;as&nbsp;thats&nbsp;one&nbsp;of&nbsp;the&nbsp;main&nbsp;reasons&nbsp;people&nbsp;are&nbsp;moving&nbsp;data&nbsp;to&nbsp;geodatabases).&nbsp;&nbsp;I&nbsp;can&nbsp;probably&nbsp;handle&nbsp;this&nbsp;by&nbsp;setting&nbsp;a&nbsp;lock&nbsp;when&nbsp;an&nbsp;object&nbsp;is&nbsp;moved&nbsp;to&nbsp;the&nbsp;TrackOverlay&nbsp;layer&nbsp;-&nbsp;and&nbsp;holding&nbsp;it&nbsp;until&nbsp;it&nbsp;is&nbsp;written&nbsp;back.&nbsp;&nbsp;We've&nbsp;done&nbsp;this&nbsp;before&nbsp;with&nbsp;other&nbsp;systems.

Best&nbsp;wishes

&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 21, 2010, 6:49pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/4 "2010-02-21T18:49:08Z")

</div>

James,

Thanks&nbsp;for&nbsp;your&nbsp;reply.  
&nbsp;  
&nbsp;

  
&nbsp;&nbsp;&nbsp;&nbsp;1. About&nbsp;the&nbsp;Edit&nbsp;using&nbsp;EditInterativeOverlay&nbsp;instead&nbsp;of&nbsp;TrackInterativeOverlay,&nbsp;these&nbsp;two&nbsp;interactive&nbsp;overlays&nbsp;are&nbsp;very&nbsp;similar&nbsp;while&nbsp;there&nbsp;are&nbsp;different&nbsp;somehow.&nbsp;TrackInterativeOverlay&nbsp;are&nbsp;responsible&nbsp;for&nbsp;tracking&nbsp;shape,&nbsp;following&nbsp;samples&nbsp;shows&nbsp;how&nbsp;to&nbsp;extend&nbsp;it&nbsp;to&nbsp;customize&nbsp;your&nbsp;own&nbsp;behaviors.
  

  
[code.thinkgeo.com/projects/show/customtrackline](http://code.thinkgeo.com/projects/show/customtrackline)  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;While&nbsp;the&nbsp;EditInterativeOverlay&nbsp;are&nbsp;responsible&nbsp;for&nbsp;edit&nbsp;shapes,&nbsp;following&nbsp;project&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is&nbsp;showing&nbsp;how&nbsp;to&nbsp;extend&nbsp;it:  
[code.thinkgeo.com/projects/s...rectangles](http://code.thinkgeo.com/projects/show/editingrectangles)  
&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;think&nbsp;this&nbsp;is&nbsp;the&nbsp;most&nbsp;convenient&nbsp;way&nbsp;to&nbsp;deal&nbsp;with&nbsp;edit&nbsp;using&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EditInterativeOverlay&nbsp;because&nbsp;all&nbsp;the&nbsp;edit&nbsp;logics&nbsp;(Drag,&nbsp;Resize,&nbsp;Add&nbsp;or&nbsp;Delete&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nodes)&nbsp;are&nbsp;encapsulated&nbsp;in&nbsp;it.&nbsp;I&nbsp;am&nbsp;afraid&nbsp;we&nbsp;have&nbsp;to&nbsp;use&nbsp;it&nbsp;in&nbsp;this&nbsp;way&nbsp;if&nbsp;we&nbsp;want&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;avoid&nbsp;those&nbsp;complicated&nbsp;logics.  
&nbsp;  
Even&nbsp;though,&nbsp;we&nbsp;still&nbsp;can&nbsp;enhance&nbsp;it&nbsp;or&nbsp;change&nbsp;its&nbsp;behaviors&nbsp;by&nbsp;rewriting&nbsp;our&nbsp;own&nbsp;EditInterativeOverlay,&nbsp;we&nbsp;exposed&nbsp;couple&nbsp;of&nbsp;methods&nbsp;out&nbsp;to&nbsp;be&nbsp;overridden,&nbsp;for&nbsp;more&nbsp;details&nbsp;you&nbsp;could&nbsp;have&nbsp;a&nbsp;look&nbsp;at&nbsp;the&nbsp;project&nbsp;obove.  
&nbsp;  
I&nbsp;remember&nbsp;I&nbsp;made&nbsp;a&nbsp;sample&nbsp;in&nbsp;this&nbsp;discussion&nbsp;form&nbsp;showing&nbsp;how&nbsp;to&nbsp;edit&nbsp;a&nbsp;existing&nbsp;polygon&nbsp;in&nbsp;the&nbsp;shape&nbsp;file,&nbsp;while&nbsp;I&nbsp;did&nbsp;not&nbsp;find&nbsp;it&nbsp;here,&nbsp;if&nbsp;you&nbsp;want,&nbsp;we&nbsp;can&nbsp;try&nbsp;to&nbsp;re-make&nbsp;it&nbsp;or&nbsp;I&nbsp;will&nbsp;try&nbsp;to&nbsp;search&nbsp;more.  
&nbsp;  

  
&nbsp;&nbsp;&nbsp;&nbsp;1. About&nbsp;the&nbsp;magic&nbsp;keys,&nbsp;I&nbsp;do&nbsp;not&nbsp;think&nbsp;you&nbsp;missed&nbsp;any&nbsp;in&nbsp;the&nbsp;default&nbsp;way,&nbsp;while,&nbsp;you&nbsp;could&nbsp;add&nbsp;many&nbsp;more&nbsp;“magic”&nbsp;keys&nbsp;or&nbsp;“magic”&nbsp;behaviors&nbsp;by&nbsp;your&nbsp;own&nbsp;codes,&nbsp;and&nbsp;the&nbsp;sample&nbsp;code&nbsp;use&nbsp;“Esc”&nbsp;to&nbsp;cancel&nbsp;the&nbsp;tracking&nbsp;is&nbsp;a&nbsp;simple&nbsp;demonstration&nbsp;for&nbsp;this.
  

  
&nbsp;  

  
&nbsp;&nbsp;&nbsp;&nbsp;1. I&nbsp;agree&nbsp;that&nbsp;the&nbsp;lock&nbsp;should&nbsp;solve&nbsp;the&nbsp;multi-user&nbsp;problem;&nbsp;I&nbsp;am&nbsp;afraid&nbsp;this&nbsp;is&nbsp;the&nbsp;common&nbsp;and&nbsp;suggested&nbsp;way&nbsp;to&nbsp;deal&nbsp;with&nbsp;it.
  

  
&nbsp;  
&nbsp;  
Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks.  
&nbsp;  
Yale

---

<div class="post-metadata">

**Author:** ![JamesPerrins](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/8c91f0/32.png) [@JamesPerrins](https://community.thinkgeo.com/u/JamesPerrins)\
**Post date:** [February 22, 2010, 2:54am UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/5 "2010-02-22T02:54:51Z")

</div>

Thank&nbsp;Yale,  
  
  
  
If&nbsp;you&nbsp;had&nbsp;an&nbsp;example&nbsp;of&nbsp;how&nbsp;to&nbsp;add&nbsp;/&nbsp;edit&nbsp;records&nbsp;in&nbsp;an&nbsp;existing&nbsp;shape&nbsp;file&nbsp;-&nbsp;that&nbsp;would&nbsp;be&nbsp;great&nbsp;-&nbsp;as&nbsp;that&nbsp;is&nbsp;basically&nbsp;what&nbsp;I&nbsp;was&nbsp;wanting&nbsp;to&nbsp;do&nbsp;(though&nbsp;from&nbsp;SQL)  
  
  
  
I'm&nbsp;afraid&nbsp;I'm&nbsp;getting&nbsp;tied&nbsp;up&nbsp;with&nbsp;TrackOverlays&nbsp;and&nbsp;EditOverlays&nbsp;without&nbsp;really&nbsp;understanding&nbsp;what&nbsp;they&nbsp;are&nbsp;/&nbsp;what&nbsp;the&nbsp;differences&nbsp;are.&nbsp;&nbsp;Its&nbsp;just&nbsp;that&nbsp;all&nbsp;the&nbsp;edit&nbsp;examples&nbsp;I've&nbsp;seen&nbsp;seem&nbsp;to&nbsp;relate&nbsp;to&nbsp;this.  
  
  
  
I&nbsp;gather&nbsp;from&nbsp;various&nbsp;posts&nbsp;that&nbsp;what&nbsp;you&nbsp;don't&nbsp;have&nbsp;any&nbsp;documentation&nbsp;that&nbsp;describes&nbsp;how&nbsp;all&nbsp;the&nbsp;bits&nbsp;slot&nbsp;together&nbsp;-&nbsp;and&nbsp;broadly&nbsp;how&nbsp;you&nbsp;should&nbsp;approach&nbsp;things&nbsp;(if&nbsp;this&nbsp;does&nbsp;exits&nbsp;-&nbsp;please&nbsp;point&nbsp;me&nbsp;at&nbsp;it!)&nbsp;-&nbsp;I&nbsp;think&nbsp;this&nbsp;would&nbsp;help&nbsp;someone&nbsp;getting&nbsp;started&nbsp;enormously.&nbsp;&nbsp;I&nbsp;wouldn't&nbsp;have&nbsp;thought&nbsp;it&nbsp;had&nbsp;to&nbsp;be&nbsp;overkill&nbsp;-&nbsp;but&nbsp;10&nbsp;pages&nbsp;or&nbsp;so&nbsp;(perhaps&nbsp;a&nbsp;bit&nbsp;more&nbsp;with&nbsp;screen&nbsp;shots)&nbsp;-&nbsp;and&nbsp;referring&nbsp;to&nbsp;examples&nbsp;when&nbsp;appropriate&nbsp;-&nbsp;would&nbsp;I&nbsp;think&nbsp;be&nbsp;a&nbsp;great&nbsp;help&nbsp;to&nbsp;someone&nbsp;getting&nbsp;started.&nbsp;&nbsp;I&nbsp;suspect&nbsp;you&nbsp;guys&nbsp;suffer&nbsp;from&nbsp;being&nbsp;so&nbsp;close&nbsp;to&nbsp;it&nbsp;that&nbsp;you&nbsp;find&nbsp;it&nbsp;difficult&nbsp;to&nbsp;understand&nbsp;how&nbsp;someone&nbsp;just&nbsp;starting&nbsp;struggles&nbsp;to&nbsp;get&nbsp;their&nbsp;head&nbsp;around&nbsp;it.  
  
  
  
The&nbsp;examples&nbsp;are&nbsp;great&nbsp;for&nbsp;the&nbsp;detail&nbsp;-&nbsp;if&nbsp;there&nbsp;is&nbsp;one&nbsp;thats&nbsp;close&nbsp;(though&nbsp;I&nbsp;do&nbsp;worry&nbsp;that&nbsp;I&nbsp;may&nbsp;be&nbsp;approaching&nbsp;something&nbsp;the&nbsp;wrong&nbsp;way&nbsp;-&nbsp;simply&nbsp;because&nbsp;there&nbsp;is&nbsp;an&nbsp;example&nbsp;to&nbsp;start&nbsp;from)&nbsp;-&nbsp;and&nbsp;the&nbsp;replies&nbsp;to&nbsp;this&nbsp;forum&nbsp;are&nbsp;always&nbsp;prompt&nbsp;-&nbsp;but&nbsp;I&nbsp;feel&nbsp;guilty&nbsp;and&nbsp;a&nbsp;bit&nbsp;stupid&nbsp;asking&nbsp;questions&nbsp;which&nbsp;I&nbsp;sort&nbsp;of&nbsp;figure&nbsp;I&nbsp;should&nbsp;be&nbsp;able&nbsp;to&nbsp;find&nbsp;my&nbsp;own&nbsp;answers&nbsp;to.

P.S.&nbsp;I&nbsp;assume&nbsp;you&nbsp;know&nbsp;that&nbsp;posting&nbsp;in&nbsp;these&nbsp;forums&nbsp;doesn't&nbsp;work&nbsp;from&nbsp;google&nbsp;chrome&nbsp;-&nbsp;keeps&nbsp;catching&nbsp;me&nbsp;out&nbsp;!  
  
  
  
Thanks&nbsp;  
  
James

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 22, 2010, 7:28pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/6 "2010-02-22T19:28:06Z")

</div>

James,

I&nbsp;am&nbsp;glad&nbsp;to&nbsp;show&nbsp;you&nbsp;that&nbsp;following&nbsp;post&nbsp;are&nbsp;talking&nbsp;about&nbsp;how&nbsp;to&nbsp;retrieve/edit/save&nbsp;back&nbsp;shapes&nbsp;both&nbsp;from&nbsp;SQL&nbsp;server&nbsp;and&nbsp;shape&nbsp;file.&nbsp;Take&nbsp;a&nbsp;look&nbsp;at&nbsp;the&nbsp;following&nbsp;posts&nbsp;if&nbsp;you&nbsp;are&nbsp;interested.  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6496/afv/topic/Default.aspx)  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6019/afv/topic/Default.aspx)  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5098/afv/topic/Default.aspx)  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5595/afv/topic/Default.aspx)  
  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5096/afv/topic/Default.aspx)

We&nbsp;probably&nbsp;need&nbsp;to&nbsp;enhance&nbsp;the&nbsp;documentations&nbsp;to&nbsp;make&nbsp;it&nbsp;complete&nbsp;and&nbsp;easy&nbsp;to&nbsp;understand.

Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.

Thanks.

Yale  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![JamesPerrins](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/8c91f0/32.png) [@JamesPerrins](https://community.thinkgeo.com/u/JamesPerrins)\
**Post date:** [February 23, 2010, 3:02am UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/7 "2010-02-23T03:02:49Z")

</div>

Hi&nbsp;Yale,

Thanks&nbsp;-&nbsp;I've&nbsp;seen&nbsp;most&nbsp;of&nbsp;those&nbsp;thanks.

I&nbsp;have&nbsp;it&nbsp;mostly&nbsp;working&nbsp;-&nbsp;in&nbsp;that&nbsp;reading&nbsp;and&nbsp;writing&nbsp;to&nbsp;a&nbsp;SQL&nbsp;table&nbsp;is&nbsp;fine&nbsp;-&nbsp;the&nbsp;bit&nbsp;I'm&nbsp;struggling&nbsp;with&nbsp;is&nbsp;the&nbsp;actual&nbsp;interactive&nbsp;editing.

I&nbsp;can&nbsp;do&nbsp;this&nbsp;fine&nbsp;on&nbsp;a&nbsp;layer&nbsp;thats&nbsp;not&nbsp;linked&nbsp;to&nbsp;the&nbsp;database&nbsp;-&nbsp;but&nbsp;how&nbsp;to&nbsp;put&nbsp;it&nbsp;all&nbsp;together.

I&nbsp;think&nbsp;basically&nbsp;I&nbsp;don't&nbsp;really&nbsp;understand&nbsp;the&nbsp;differences&nbsp;between:

  
&nbsp;&nbsp;&nbsp;&nbsp;- My&nbsp;SQL&nbsp;layer
  
&nbsp;&nbsp;&nbsp;&nbsp;- TrackLayer
  
&nbsp;&nbsp;&nbsp;&nbsp;- Edit&nbsp;Layer
  

  

The&nbsp;code&nbsp;I&nbsp;sort&nbsp;of&nbsp;have&nbsp;working&nbsp;seems&nbsp;to&nbsp;involve&nbsp;copying&nbsp;from&nbsp;my&nbsp;sql,&nbsp;to&nbsp;track&nbsp;to&nbsp;edit&nbsp;-&nbsp;do&nbsp;the&nbsp;edit&nbsp;-&nbsp;and&nbsp;then&nbsp;reverse&nbsp;the&nbsp;copy&nbsp;process.

Is&nbsp;this&nbsp;really&nbsp;the&nbsp;way&nbsp;to&nbsp;do&nbsp;it&nbsp;?&nbsp;Whats&nbsp;this&nbsp;doing&nbsp;to&nbsp;my&nbsp;memory&nbsp;useage?&nbsp;Is&nbsp;it&nbsp;really&nbsp;duplicating&nbsp;the&nbsp;object&nbsp;each&nbsp;time&nbsp;or&nbsp;just&nbsp;inheriting&nbsp;in&nbsp;some&nbsp;way.

I&nbsp;can&nbsp;see&nbsp;this&nbsp;works&nbsp;OK&nbsp;ish&nbsp;for&nbsp;a&nbsp;single&nbsp;object&nbsp;-&nbsp;but&nbsp;one&nbsp;of&nbsp;your&nbsp;examples&nbsp;shows&nbsp;copying&nbsp;all&nbsp;the&nbsp;objects&nbsp;from&nbsp;a&nbsp;sql&nbsp;layer&nbsp;to&nbsp;a&nbsp;track&nbsp;layer&nbsp;-&nbsp;if&nbsp;my&nbsp;SQL&nbsp;table&nbsp;contains&nbsp;100,000&nbsp;complex&nbsp;polygons&nbsp;-&nbsp;this&nbsp;doesn't&nbsp;sound&nbsp;a&nbsp;good&nbsp;way&nbsp;to&nbsp;go&nbsp;?

\<We&nbsp;probably&nbsp;need&nbsp;to&nbsp;enhance&nbsp;the&nbsp;documentations&nbsp;to&nbsp;make&nbsp;it&nbsp;complete&nbsp;and&nbsp;easy&nbsp;to&nbsp;understand.\<we&nbsp;understand.=""&nbsp;to=""&nbsp;easy=""&nbsp;and=""&nbsp;complete=""&nbsp;it=""&nbsp;make=""&nbsp;documentations=""&nbsp;the=""&nbsp;enhance=""&nbsp;need=""&nbsp;probably=""\>\>\</we\>

I&nbsp;would&nbsp;agree&nbsp;;-)

Thanks

---

<div class="post-metadata">

**Author:** ![David](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.thinkgeo.com/u/David)\
**Post date:** [February 23, 2010, 4:58pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/8 "2010-02-23T16:58:25Z")

</div>

J,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;I&nbsp;think&nbsp;the&nbsp;idea&nbsp;is&nbsp;that&nbsp;you&nbsp;typically&nbsp;do&nbsp;not&nbsp;want&nbsp;to&nbsp;edit&nbsp;100,000&nbsp;shapes&nbsp;at&nbsp;one&nbsp;time.&nbsp;&nbsp;That&nbsp;kind&nbsp;if&nbsp;thing&nbsp;just&nbsp;isn’t&nbsp;what&nbsp;I&nbsp;think&nbsp;anyone&nbsp;would&nbsp;want&nbsp;to&nbsp;do.&nbsp;&nbsp;Instead&nbsp;what&nbsp;we&nbsp;recommend&nbsp;is&nbsp;that&nbsp;the&nbsp;user&nbsp;selects&nbsp;what&nbsp;they&nbsp;want&nbsp;to&nbsp;edit.&nbsp;&nbsp;Maybe&nbsp;a&nbsp;spatial&nbsp;query&nbsp;based&nbsp;on&nbsp;what&nbsp;they&nbsp;clicked&nbsp;one,&nbsp;draw&nbsp;a&nbsp;box&nbsp;around&nbsp;etc.&nbsp;&nbsp;Next&nbsp;we&nbsp;move&nbsp;just&nbsp;those&nbsp;items&nbsp;into&nbsp;the&nbsp;edit&nbsp;system&nbsp;do&nbsp;they&nbsp;can&nbsp;be&nbsp;manipulated&nbsp;and&nbsp;then&nbsp;you&nbsp;move&nbsp;them&nbsp;out&nbsp;when&nbsp;finished&nbsp;and&nbsp;commit&nbsp;them&nbsp;to&nbsp;your&nbsp;layer.&nbsp;&nbsp;Maybe&nbsp;what&nbsp;you&nbsp;are&nbsp;anticipating&nbsp;is&nbsp;a&nbsp;way&nbsp;to&nbsp;wrap&nbsp;all&nbsp;of&nbsp;this&nbsp;together&nbsp;to&nbsp;make&nbsp;it&nbsp;more&nbsp;seamless&nbsp;and&nbsp;hide&nbsp;the&nbsp;details&nbsp;from&nbsp;you.&nbsp;&nbsp;We&nbsp;typically&nbsp;try&nbsp;and&nbsp;write&nbsp;the&nbsp;pieces&nbsp;and&nbsp;parts&nbsp;then&nbsp;use&nbsp;them&nbsp;to&nbsp;build&nbsp;up&nbsp;more&nbsp;complex&nbsp;functionality.&nbsp;&nbsp;If&nbsp;we&nbsp;build&nbsp;to&nbsp;high&nbsp;then&nbsp;less&nbsp;and&nbsp;less&nbsp;people&nbsp;find&nbsp;it&nbsp;useful&nbsp;and&nbsp;they&nbsp;are&nbsp;back&nbsp;to&nbsp;piecing&nbsp;it&nbsp;together&nbsp;themselves.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;We&nbsp;have&nbsp;had&nbsp;enough&nbsp;feedback&nbsp;on&nbsp;this&nbsp;to&nbsp;put&nbsp;together&nbsp;a&nbsp;higher&nbsp;level&nbsp;editor&nbsp;I&nbsp;think&nbsp;that&nbsp;would&nbsp;ferry&nbsp;this&nbsp;data&nbsp;around&nbsp;for&nbsp;you.&nbsp;&nbsp;We&nbsp;could&nbsp;even&nbsp;have&nbsp;one&nbsp;that&nbsp;as&nbsp;you&nbsp;move&nbsp;the&nbsp;extent&nbsp;it&nbsp;moves&nbsp;the&nbsp;features&nbsp;into&nbsp;the&nbsp;edit&nbsp;system&nbsp;automatically&nbsp;so&nbsp;you&nbsp;get&nbsp;the&nbsp;feeling&nbsp;of&nbsp;editing&nbsp;everything.&nbsp;&nbsp;Once&nbsp;you&nbsp;leave&nbsp;if&nbsp;the&nbsp;feature&nbsp;has&nbsp;changes&nbsp;we&nbsp;could&nbsp;keep&nbsp;a&nbsp;copy&nbsp;of&nbsp;it&nbsp;around&nbsp;for&nbsp;committing.&nbsp;&nbsp;If&nbsp;you&nbsp;did&nbsp;not&nbsp;change&nbsp;the&nbsp;feature&nbsp;then&nbsp;we&nbsp;throw&nbsp;it&nbsp;away&nbsp;of&nbsp;keep&nbsp;some&nbsp;kind&nbsp;of&nbsp;rolling&nbsp;cache.&nbsp;&nbsp;There&nbsp;are&nbsp;so&nbsp;many&nbsp;ways&nbsp;you&nbsp;could&nbsp;build&nbsp;this&nbsp;kind&nbsp;of&nbsp;thing&nbsp;up&nbsp;and&nbsp;we&nbsp;are&nbsp;really&nbsp;looking&nbsp;for&nbsp;some&nbsp;concrete&nbsp;cases.&nbsp;&nbsp;Once&nbsp;we&nbsp;get&nbsp;those&nbsp;we&nbsp;can&nbsp;start&nbsp;building.&nbsp;&nbsp;One&nbsp;downside&nbsp;of&nbsp;building&nbsp;too&nbsp;high&nbsp;for&nbsp;us&nbsp;is&nbsp;that&nbsp;people&nbsp;want&nbsp;all&nbsp;kinds&nbsp;of&nbsp;different&nbsp;things.&nbsp;&nbsp;They&nbsp;may&nbsp;like&nbsp;a&nbsp;temporary&nbsp;storage&nbsp;medium&nbsp;to&nbsp;allow&nbsp;users&nbsp;to&nbsp;have&nbsp;transactions&nbsp;across&nbsp;days&nbsp;or&nbsp;weeks.&nbsp;&nbsp;They&nbsp;may&nbsp;retrieve&nbsp;it&nbsp;from&nbsp;SQL&nbsp;but&nbsp;them&nbsp;store&nbsp;transactions&nbsp;in&nbsp;shape&nbsp;files.&nbsp;&nbsp;All&nbsp;kinds&nbsp;of&nbsp;possibilities.&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;One&nbsp;a&nbsp;quick&nbsp;technical&nbsp;note:&nbsp;&nbsp;Typically&nbsp;the&nbsp;shapes&nbsp;are&nbsp;not&nbsp;that&nbsp;large&nbsp;and&nbsp;are&nbsp;usually&nbsp;in&nbsp;feature&nbsp;form&nbsp;which&nbsp;means&nbsp;at&nbsp;the&nbsp;core&nbsp;is&nbsp;just&nbsp;a&nbsp;byte&nbsp;array&nbsp;of&nbsp;well&nbsp;known&nbsp;binary.&nbsp;&nbsp;They&nbsp;are&nbsp;fairly&nbsp;compact&nbsp;and&nbsp;since&nbsp;they&nbsp;are&nbsp;structures&nbsp;and&nbsp;on&nbsp;the&nbsp;stack&nbsp;they&nbsp;clean&nbsp;up&nbsp;very&nbsp;easily&nbsp;and&nbsp;don’t&nbsp;put&nbsp;too&nbsp;much&nbsp;pressure&nbsp;on&nbsp;the&nbsp;garbage&nbsp;collector.&nbsp;&nbsp;Also&nbsp;just&nbsp;to&nbsp;clarify&nbsp;something,&nbsp;the&nbsp;track&nbsp;interactive&nbsp;overlay&nbsp;is&nbsp;for&nbsp;drawing&nbsp;new&nbsp;shapes&nbsp;and&nbsp;the&nbsp;edit&nbsp;interactive&nbsp;overlay&nbsp;is&nbsp;to&nbsp;edit&nbsp;shapes&nbsp;you&nbsp;already&nbsp;have.&nbsp;&nbsp;From&nbsp;reading&nbsp;your&nbsp;post&nbsp;I&nbsp;think&nbsp;you&nbsp;know&nbsp;that&nbsp;but&nbsp;wanted&nbsp;to&nbsp;just&nbsp;say&nbsp;it&nbsp;to&nbsp;be&nbsp;sure.&nbsp;  
&nbsp;&nbsp;  
&nbsp;David

---

<div class="post-metadata">

**Author:** ![JamesPerrins](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/8c91f0/32.png) [@JamesPerrins](https://community.thinkgeo.com/u/JamesPerrins)\
**Post date:** [February 23, 2010, 6:20pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/9 "2010-02-23T18:20:55Z")

</div>

Thanks&nbsp;David,

I&nbsp;think&nbsp;I&nbsp;had&nbsp;just&nbsp;about&nbsp;got&nbsp;to&nbsp;the&nbsp;point&nbsp;of&nbsp;understanding&nbsp;that&nbsp;track&nbsp;is&nbsp;for&nbsp;new&nbsp;and&nbsp;edit&nbsp;is&nbsp;for&nbsp;changing&nbsp;existing&nbsp;-&nbsp;though&nbsp;it&nbsp;took&nbsp;me&nbsp;a&nbsp;while&nbsp;to&nbsp;piece&nbsp;that&nbsp;together.

I&nbsp;agree&nbsp;entirely&nbsp;that&nbsp;is&nbsp;not&nbsp;sensible&nbsp;to&nbsp;move&nbsp;1000's&nbsp;of&nbsp;shapes&nbsp;to&nbsp;an&nbsp;editing&nbsp;layer&nbsp;-&nbsp;but&nbsp;was&nbsp;slighlty&nbsp;confused&nbsp;as&nbsp;Yale&nbsp;pointed&nbsp;me&nbsp;at&nbsp;an&nbsp;example&nbsp;which&nbsp;looped&nbsp;through&nbsp;all&nbsp;the&nbsp;fetaures&nbsp;and&nbsp;moved&nbsp;them&nbsp;across&nbsp;to&nbsp;the&nbsp;edit&nbsp;layer&nbsp;-&nbsp;but&nbsp;I&nbsp;guess&nbsp;maybe&nbsp;that&nbsp;was&nbsp;an&nbsp;example&nbsp;of&nbsp;a&nbsp;small&nbsp;layer.

As&nbsp;you&nbsp;say&nbsp;-&nbsp;you&nbsp;could&nbsp;easily&nbsp;move&nbsp;features&nbsp;to&nbsp;edit&nbsp;as&nbsp;the&nbsp;user&nbsp;pans&nbsp;around&nbsp;-&nbsp;provided&nbsp;they&nbsp;were&nbsp;at&nbsp;a&nbsp;sensible&nbsp;zoom&nbsp;level&nbsp;-&nbsp;and&nbsp;also&nbsp;agree&nbsp;that&nbsp;providing&nbsp;you&nbsp;keep&nbsp;a&nbsp;cap&nbsp;on&nbsp;the&nbsp;number&nbsp;of&nbsp;shapes&nbsp;moved&nbsp;in&nbsp;any&nbsp;one&nbsp;go&nbsp;-&nbsp;memory&nbsp;useage&nbsp;should&nbsp;be&nbsp;lightish&nbsp;-&nbsp;with&nbsp;WKB&nbsp;objects.

In&nbsp;fact&nbsp;seeing&nbsp;as&nbsp;we&nbsp;are&nbsp;looking&nbsp;at&nbsp;SQL&nbsp;2008&nbsp;primarily&nbsp;on&nbsp;potentially&nbsp;quite&nbsp;large&nbsp;datasets&nbsp;I'd&nbsp;probably&nbsp;be&nbsp;happy&nbsp;with&nbsp;a&nbsp;system&nbsp;where&nbsp;a&nbsp;user&nbsp;selects&nbsp;and&nbsp;existing&nbsp;object&nbsp;for&nbsp;edit&nbsp;(which&nbsp;means&nbsp;I&nbsp;can&nbsp;set&nbsp;locks&nbsp;on&nbsp;the&nbsp;record&nbsp;in&nbsp;the&nbsp;database&nbsp;etc&nbsp;at&nbsp;that&nbsp;point).

Sorry&nbsp;for&nbsp;all&nbsp;teh&nbsp;questions&nbsp;-&nbsp;but&nbsp;with&nbsp;limited&nbsp;documentation&nbsp;is&nbsp;been&nbsp;a&nbsp;slight&nbsp;challenge&nbsp;putting&nbsp;together&nbsp;the&nbsp;bits&nbsp;-&nbsp;and&nbsp;the&nbsp;determing&nbsp;what&nbsp;cahcing&nbsp;,&nbsp;or&nbsp;SQL&nbsp;access&nbsp;or&nbsp;editing&nbsp;etc&nbsp;actually&nbsp;does&nbsp;/&nbsp;doesn't&nbsp;do.

&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 23, 2010, 7:26pm UTC](https://community.thinkgeo.com/t/adding-inserting-records-to-sql-database/1064/10 "2010-02-23T19:26:17Z")

</div>

James,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;response.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;David’&nbsp;idea&nbsp;mentioned&nbsp;above&nbsp;is&nbsp;quite&nbsp;right.&nbsp;The&nbsp;samples&nbsp;I&nbsp;point&nbsp;you&nbsp;out&nbsp;is&nbsp;somehow&nbsp;did&nbsp;not&nbsp;consider&nbsp;carefully&nbsp;edit&nbsp;from&nbsp;a&nbsp;quite&nbsp;large&nbsp;data&nbsp;source.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Now,&nbsp;I&nbsp;think&nbsp;your&nbsp;understanding&nbsp;on&nbsp;TrackInterativeOverlay&nbsp;and&nbsp;EditInterativeOverlay&nbsp;is&nbsp;quite&nbsp;close.&nbsp;The&nbsp;other&nbsp;system&nbsp;related&nbsp;while&nbsp;different&nbsp;is&nbsp;edit&nbsp;system,&nbsp;which&nbsp;is&nbsp;not&nbsp;a&nbsp;concrete&nbsp;layer,&nbsp;it&nbsp;can&nbsp;be&nbsp;considered&nbsp;as&nbsp;a&nbsp;set&nbsp;of&nbsp;operations&nbsp;on&nbsp;the&nbsp;data&nbsp;source,&nbsp;basically&nbsp;it&nbsp;composes&nbsp;of&nbsp;3&nbsp;steps:&nbsp;BeginTransaction,&nbsp;Edit(Add/Delete)&nbsp;and&nbsp;EndTrancaction.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;
