He intentado hacer este ejemplito
http://www.elguille.info/NET/ASPNET...htm#codigo
pero me sale este error :( :
¿alguien podria orientarme? Gracias!!!
Server Error in '/vwdTut01' Application.
ExecuteNonQuery: CommandText property has not been initialized
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.InvalidOperationException: ExecuteNonQuery:
CommandText property has not been initialized
Source Error:
Line 44: cmd.Parameters.AddWithValue("@Comentarios",
txtComentarios.Text)
Line 45: 'Ejecutamos la insercion
Line 46: cmd.ExecuteNonQuery()
Line 47: 'Cerramos conexion
Line 48: End Using
Source File: C:\Documents and Settings\mgalaviz\Mis documentos\Visual Studio
2005\WebSites\vwdTut01\AgregarUsuario.aspx.vb Line: 46
Stack Trace:
[InvalidOperationException: ExecuteNonQuery: CommandText property has not
been initialized]
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean
async) +334
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe) +72
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115
AgregarUsuario.btnNuevo_Click(Object sender, EventArgs e) in C:\Documents
and Settings\mgalaviz\Mis documentos\Visual Studio
2005\WebSites\vwdTut01\AgregarUsuario.aspx.vb:46
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
+97
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210
Leer las respuestas