• Viernes 19 de Abril de 2024, 05:54

Autor Tema:  Asp.net C# Acces Dreamweaver  (Leído 1913 veces)

Jarb2104

  • Nuevo Miembro
  • *
  • Mensajes: 3
    • Ver Perfil
Asp.net C# Acces Dreamweaver
« en: Jueves 22 de Septiembre de 2005, 02:36 »
0
Hace algun tiempo empece a usar dreamweaver... y no ha habido ningun problema con usarlo... estaba haciendo los tutoriales de dreamweaver... hasta que me tope con el tutorial de insertar nuevos registros en la base de datos... el siguiente error me aparece en la pagina...

System.Data.OleDb.OleDbException: La operación debe usar una consulta actualizable.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at DreamweaverCtrls.DataSet.DoInit()

hasta ahora he probado todo... todo lo que he encontrado en internet... en especial he encotrado algo de permisos... pero no funciona nada... a continuacion dejo mi codigo espero que alguien me pueda ayudar.. ya estoy desesperado... GRACIAS de antemano...

//cutomerinsert.aspx
-------------------------------------------------------------------------------------------
<%@ Page Language="C#" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>

<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO COMMENTS (FIRST_NAME, LAST_NAME, EMAIL, COMMENTS) VALUES (value, ?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_MyConnectio"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_MyConnectio"] %>'
Expression='<%# Request.Form["MM_insert"] == "form1" %>'
CreateDataSet="false"
SuccessURL='<%# "insertOK.aspx" %>'
Debug="true"
>

  <Parameters>
    <Parameter Name="@FIRST_NAME" Value='<%# ((Request.Form["FIRST_NAME"] != null) && (Request.Form["FIRST_NAME"].Length > 0)) ? Request.Form["FIRST_NAME"] : "" %>' Type="VarChar" />
   
    <Parameter Name="@LAST_NAME" Value='<%# ((Request.Form["LAST_NAME"] != null) && (Request.Form["LAST_NAME"].Length > 0)) ? Request.Form["LAST_NAME"] : "" %>' Type="VarChar" />
   
    <Parameter Name="@EMAIL" Value='<%# ((Request.Form["EMAIL"] != null) && (Request.Form["EMAIL"].Length > 0)) ? Request.Form["EMAIL"] : "" %>' Type="VarChar" />
   
    <Parameter Name="@COMMENTS" Value='<%# ((Request.Form["COMMENTS"] != null) && (Request.Form["COMMENTS"].Length > 0)) ? Request.Form["COMMENTS"] : "" %>' Type="VarChar" />
  </Parameters>
 
</MM:Insert>

<MM:PageBind runat="server" PostBackBind="true" />
<html>

<head>
<title>Customer Service</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
//-->
</script>
<link href="Assets/master.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>

<table width="356" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="356" height="405" valign="top"> <form method="POST" name="form1" runat="server">
        <table align="center">
          <tr valign="baseline">
            <td nowrap align="right">FIRST_NAME:</td>
            <td> <asp:textbox id="FIRST_NAME" text='Mi nombre' TextMode="SingleLine" Columns="32" runat="server" /> </td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">LAST_NAME:</td>
            <td> <asp:textbox id="LAST_NAME" text='Mi apellido' TextMode="SingleLine" Columns="32" runat="server" /> </td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">EMAIL:</td>
            <td> <asp:textbox id="EMAIL" text='Mimail@Mipagina.com' TextMode="SingleLine" Columns="32" runat="server" /> </td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right" valign="top">COMMENTS:</td>
            <td> <asp:textbox id="COMMENTS" text='Escriba Su Comentario' TextMode="Multiline" Columns="50" Rows="5" runat="server" /> </td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right"> </td>
            <td><input type="submit" value="Insert Record"></td>
          </tr>
        </table>
        <input type="hidden" name="MM_insert" value="form1">
      </form> </td>
</table>
</body>
</html>
----------------------------------------------------------------------------------------------
//web.config
----------------------------------------------------------------------------------------------
<configuration>
   <appSettings>
      <add key="MM_CONNECTION_HANDLER_MyConnectio" value="default_oledb.htm" />
      <add key="MM_CONNECTION_STRING_MyConnectio" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sites\Database\global.mdb;" />
      <add key="MM_CONNECTION_DATABASETYPE_MyConnectio" value="OleDb" />
      <add key="MM_CONNECTION_SCHEMA_MyConnectio" value="" />
      <add key="MM_CONNECTION_CATALOG_MyConnectio" value="" />
   </appSettings>
</configuration>
----------------------------------------------------------------------------------------------
AYUDENME POR FAVOR!!...

sergiotarrillo

  • Moderador
  • ******
  • Mensajes: 1059
    • Ver Perfil
    • http://sergiot2.com/blog
Re: Asp.net C# Acces Dreamweaver
« Respuesta #1 en: Jueves 22 de Septiembre de 2005, 04:18 »
0
que y todo el código lo haces por Dreamweaver? es decir con las herramientas de estas?.

O también le metes mano al código?.

Es decir conectarse en Visual Studio, Visual Web DEveloper, Web Matrix, debe ser lo mismo.

Tu has usado el Wizard de conexión de dreamweaver?. Lo que te recomendaria es crear un proyect en VS con todas webs... y despues lo abres desde dreamweaver. Para mejorarla en diseño. Y cuando quieras trabajar con código lo hagas en VS.

Saludos,


Sergio Tarrillo
Blog]miBlog[/url]

No me visiten!

Jarb2104

  • Nuevo Miembro
  • *
  • Mensajes: 3
    • Ver Perfil
Re: Asp.net C# Acces Dreamweaver
« Respuesta #2 en: Jueves 22 de Septiembre de 2005, 18:23 »
0
Si hago todo el codigo desde Dreamweaver... y sigo el wizard tambien... y tambien le meto mano al codigo cuando quiero que haga algo mas especificoo... pero por lo general solo es codigo de C# en algun script y nada mas añado las cosas que necesito con el dreamweaver... de todas formas ese codigo no lo he tocado para nada... y pues... si he probado con VS... pero he encontrado que para eso mejor lo hago directamente en notepad y luego solo hago el diseño en dream weaver... aun asi el problema persiste... de todas maneras... otro problema que descubri despues del post... es que mi pagina... no es visible desde otra maquina en mi red... pero solo es la pagina... ya que todo lo demas compartir carpetas... archivos... ping... todo eso si lo hace bien... y si se comunican... a mi parecer debe ser algo en la configuracion del IIS o del .NET framework... pero no estoy seguro de que pueda ser... o que en verdad sea algo alli... ademas que me da un poco de miedo ponerme a mover las opciones y que pueda empeorar las cosas... y tambien les dejo algunos detalles de mi maquina por si sivern...

Microsoft Windows XP
Profesional
Version 2002
Service Pack 2...

intel pentium 4 de 1.5 ghz 512ram...

Dreamweaver MX Education Version...

Microsoft .Net framework 1.1
Microsoft .Net framework 1.1 hotfix (KB886903)
Microsoft .Net framework 1.1 Spanish Lenguage Pack
Microsoft .Net framework SDK (English) 1.1