>Hi everybody,
>
>I'm trying to figure out a problem with the inserting information.
>
>I have a formView with
>
>OnItemInserted="Some Procedure"
>
>In this procedure we have:
>
> if (e.Exception == null)
> //some code
> }
> else
> {
> string Text = "The data was entered in an incorrect format, please, check it over.";
> string Script = string.Format("parent.DisplayMessage(\"{0}\");", Text);
> this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Mesage", Script, true);
>
> e.ExceptionHandled = true;
> e.KeepInInsertMode = true;
> }
> }
>
>
>My question is how can I find out the generated insert string to see the actual error?
>
>The exception says 'Incorrect syntax near (.)" but it is not that helpful.
>
>Thanks a lot in advance.
Struggling with google I seem to find an answer on my question SqlDataSource1.InsertCommand.ToString()
at
http://forums.asp.net/p/978969/1247553.aspx#1247553Going to test it now.
If it's not broken, fix it until it is.
My Blog