Buen dia estoy liado como saben pues apenas hago algunas pruebitas con .NET
a ver, tengo un tableadapter con una consulta que genero todo para que desde
un FormView o un DetailsView pueda hacer inserciones, ediciones, etc.. el
punto es que no entiendo porque solo en la edicion me manda el error que
pego mas abajo, la insercion es correcta, ¿podrian sugerirme como rastrear y
corregir este error? :( siento mucho seguir haciendo preguntas medio tontas
pa ustedes pero .NET no es lo mio (de hecho todavia no encuentro que es lo
mio, jeje)
Les comento que Tengo una pagina con un grid y una columna que agregue con
un hiperlink donde al seleccionarlo mando llamar esta otra pagina donde esta
el problema que les comento.
Saludos y gracias ah, me olvidaba pego el error:
Server Error in '/Visitas_Ctes' Application.
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999
11:59:59 PM.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.SqlTypes.SqlTypeException: SqlDateTime
overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Source Error:
Line 1244: }
Line 1245: try {
Line 1246: int returnValue =
this.Adapter.UpdateCommand.ExecuteNonQuery();
Line 1247: return returnValue;
Line 1248: }
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\visitas_ctes\74fa305f\fbb4bb97\App_Code.kogywqko.1.cs Line: 1246
Stack Trace:
[SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00
AM and 12/31/9999 11:59:59 PM.]
System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value) +177
System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value) +167
System.Data.SqlTypes.SqlDateTime..ctor(DateTime value) +49
System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb)
+163
System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type,
Int32 actualLength, Int32 encodingByteSize, Int32 offset,
TdsParserStateObject stateObj) +1257
System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32
timeout, Boolean inSchema, SqlNotificationRequest notificationRequest,
TdsParserStateObject stateObj) +5497
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
+1121
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult result) +334
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe) +407
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +149
DataSet2TableAdapters.VisitaTableAdapter.Update(Int32 ClienteID, DateTime
fecha, String Personal_cte, String Objetivo, String Acuerdos, String
Seguimiento, Nullable`1 Fecha_seg, String Documento, Int32
Original_VisitaID, Int32 Original_ClienteID, DateTime Original_fecha, String
Original_Personal_cte, String Original_Objetivo, String Original_Acuerdos,
String Original_Seguimiento, Nullable`1 Original_Fecha_seg, String
Original_Documento, Int32 Original_Expr1) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\visitas_ctes\74fa305f\fbb4bb97\App_Code.kogywqko.1.cs:1246
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean
skipVisibilityChecks) +358
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +17
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod
method, Boolean disposeInstance, Object& instance) +675
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod
method) +60
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary
keys, IDictionary values, IDictionary oldValues) +2325
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values,
IDictionary oldValues, DataSourceViewOperationCallback callback) +179
System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg,
Boolean causesValidation) +1198
System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +545
System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source,
EventArgs e) +162
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source,
EventArgs e) +117
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +106
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +175
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +242
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3838
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210
Leer las respuestas