Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding the failing Insert command
Message
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01280304
Message ID:
01280319
Views:
15
>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#1247553

Going to test it now.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform