The data source control failed to execute the insert command … a simpler explanation

It’s easy to see an error message like the one in the title and go running for the hills “FAILED TO EXECUTE” Aghhgh !!! All is ashes …

Or go through and check the things you changed one at a time.

I discovered that the data binding expression I only half understood and had modified to insert new fields (below).

FieldName=”Budgeted Units” __designer:bind=”{ddwrt:DataBind(‘i’,concat(‘ff52′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@Budgeted_x0020_Units‘)}”/>

Was drawing its references, not surprisingly from the ‘<DataFields> … <DataFields/> tag set.

Where you see ‘@Budgeted_x0020_Units‘ I had instead ‘@Budgeted Units’ I should have suspected that it wasn’t gonna be space friendly.

So take outs

  1. Stay paranoid and avoid spaces in your field names.
  2. Try a few simple investigations before freakin’ out and running for the Internet.

Leave a comment