Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding the failing Insert command
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01280304
Message ID:
01280319
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform