Foros del Web » Programando para Internet » ASP Clásico »

Update...

Estas en el tema de Update... en el foro de ASP Clásico en Foros del Web. pork no me actualiza mi bd si local si me funciona muy bien, lo unico que cambia el la conexion a la Db ( en ...
  #1 (permalink)  
Antiguo 23/01/2002, 18:01
 
Fecha de Ingreso: mayo-2001
Ubicación: Monterrey, N.L.; México
Mensajes: 558
Antigüedad: 23 años
Puntos: 0
Update...

pork no me actualiza mi bd si local si me funciona muy bien, lo unico que cambia el la conexion a la Db ( en lugar de unidad D es "C" ... y la ruta una que otra cosa es lo que cambia).....

Qué pasa?...

<%
Set oConn=Server.CreateObject("ADODB.Connection&q uot;)
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\websites\yaztazcommx\db\mundodb.mdb"
sSQL="UPDATE rotabla Set Rpregunta1a = " & Rpregunta1a & ", Rpregunta1b = " & Rpregunta1b & ", Rpregunta2 = " & Rpregunta2 & ", Rpregunta3 = " & Rpregunta3
oConn.execute (sSQL)
%>

Saludos :(

Owen Bonilla
Webmaster Weblaguna S. C.
[email protected]
[email protected]

  #2 (permalink)  
Antiguo 23/01/2002, 18:50
 
Fecha de Ingreso: diciembre-2001
Ubicación: Japon
Mensajes: 47
Antigüedad: 22 años, 5 meses
Puntos: 0
Re: Update...

hola:

Checa tus permisos de escritura en la carpeta... :P

<center><PARAM NAME=menu VALUE=false> <param name=movie value="http://www.prodigyweb.net.mx/ehf/minimonito.swf"><EMBED src="http://www.prodigyweb.net.mx/ehf/minimonito.swf" menu=false quality=high wmode=transparent bgcolor=#FFFFFF WIDTH=200 HEIGHT=60 TYP
  #3 (permalink)  
Antiguo 24/01/2002, 09:31
Avatar de Aston  
Fecha de Ingreso: mayo-2001
Ubicación: Madrid
Mensajes: 933
Antigüedad: 23 años, 1 mes
Puntos: 0
Re: Update...

Hola amigo Owen:

No consigo saber que error te lanza. Si acaso el error fuera por la ruta y las unidades C: y D:, me temo que quedaría arreglado si en vez de poner la ruta completa utilizases el metodo Server.MapPath()

A continuación te pongo su sintaxis, aunque en inglés.

------------&gt; Continúa

<a href="http://www.laventanita.net/" target="_blank">
<img src="http://www.breogan.org/images/Aston.gif" border="0" alt="La Ventanita.net - Lo imprescindible en la red"></a>
  #4 (permalink)  
Antiguo 24/01/2002, 09:32
Avatar de Aston  
Fecha de Ingreso: mayo-2001
Ubicación: Madrid
Mensajes: 933
Antigüedad: 23 años, 1 mes
Puntos: 0
Re: Update...

MapPath
The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.

Syntax
Server.MapPath( Path )

Parameters
Path
Specifies the relative or virtual path to map to a physical directory. If Path starts with either a forward (/) or backward slash (\), the MapPath method returns a path as if Path is a full virtual path. If Path doesn't start with a slash, the MapPath method returns a path relative to the directory of the .asp file being processed.
Remarks
The MapPath method does not support relative path syntax (.) or (..). For example, the following relative path, ../MyDir/MyFile.txt, returns an error.

The MapPath method does not check whether the path it returns is valid or exists on the server.

Because the MapPath method maps a path regardless of whether the specified directories currently exist, you can use the MapPath method to map a path to a physical directory structure, and then pass that path to a component that creates the specified directory or file on the server.

Examples
For the examples below, the file data.txt is located in the directory, C:\Inetpub\Wwwroot\Script, as is the test.asp file that contains the following scripts. The C:\Inetpub\Wwwroot directory is set as the server's home directory.

The following example uses the server variable PATH_INFO to map the physical path of the current file. The following script

&lt;%= server.mappath(Request.ServerVariables(&quot;PATH_ INFO&quot;))%&gt;&lt;BR&gt;

produces the output

c:\inetpub\wwwroot\script\test.asp&lt;BR&gt;

Because the path parameters in the following examples do not start with a slash character, they are mapped relative to the current directory, in this case C:\Inetpub\Wwwroot\Script. The following scripts

&lt;%= server.mappath(&quot;data.txt&quot;)%&gt;&lt;BR&gt ;
&lt;%= server.mappath(&quot;script/data.txt&quot;)%&gt;&lt;BR&gt;

produce the following output

c:\inetpub\wwwroot\script\data.txt&lt;BR&gt;
c:\inetpub\wwwroot\script\script\data.txt&lt;BR&gt ;

--&gt; Continúa

<a href="http://www.laventanita.net/" target="_blank">
<img src="http://www.breogan.org/images/Aston.gif" border="0" alt="La Ventanita.net - Lo imprescindible en la red"></a>
  #5 (permalink)  
Antiguo 24/01/2002, 09:33
Avatar de Aston  
Fecha de Ingreso: mayo-2001
Ubicación: Madrid
Mensajes: 933
Antigüedad: 23 años, 1 mes
Puntos: 0
Re: Update...

The next two examples use the slash characters to specify that the path returned should be looked up as complete virtual paths on the server. The following scripts

&lt;%= server.mappath(&quot;/script/data.txt&quot;)%&gt;&lt;BR&gt;
&lt;%= server.mappath(&quot;\script&quot;)%&gt;&lt;BR&gt;

produce the following output

c:\inetpub\script\data.txt&lt;BR&gt;
c:\inetpub\script&lt;BR&gt;

The following examples demonstrate how you can use either a forward slash (/) or a backslash (\) to return the physical path to the home directory. The following scripts

&lt;%= server.mappath(&quot;/&quot;)%&gt;&lt;BR&gt;
&lt;%= server.mappath(&quot;\&quot;)%&gt;&lt;BR&gt;

produce the following output

c:\inetpub\wwwroot&lt;BR&gt;
c:\inetpub\wwwroot&lt;BR&gt;
______________________

Bueno, espero te ayude, aunque no sé si sea este el problema que tienes. Un abrazo, Owen. :)

<a href="http://www.laventanita.net/" target="_blank">
<img src="http://www.breogan.org/images/Aston.gif" border="0" alt="La Ventanita.net - Lo imprescindible en la red"></a>
  #6 (permalink)  
Antiguo 24/01/2002, 13:39
 
Fecha de Ingreso: mayo-2001
Ubicación: Monterrey, N.L.; México
Mensajes: 558
Antigüedad: 23 años
Puntos: 0
Re: Update...

Amigos.. que tal.. gracias por contestar..

Los permisos de archivos y carpetas estan bien y ahabia checado y si..

Aston, lo que me pusiste aqui esta muy bueno, ya lo copie y lo tengo para cualquier cosa ;) .. te lo agradezco mucho..

El error que me esta mandando se me paso mencionarlo... perdon.. pero aqui esta..

Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

/mundounido/procesar.asp, line 126


donde la linea 126 es esto:

conn.execute (sSQL)

no actualiza la tabla tiene problemas para hacerlo...

un comentario... porque en este servidor que estoy usando no me acepta el tipo de conección de server.mappath ??? batalle muchisimo hasta que probe esta otra conexion que estoy usando... y fue de la unica manera que pudo funcionar mis programas... :(

Saludos amigos ;)

Owen Bonilla
Webmaster Weblaguna S. C.
[email protected]
[email protected]

  #7 (permalink)  
Antiguo 24/01/2002, 17:02
 
Fecha de Ingreso: mayo-2001
Ubicación: Monterrey, N.L.; México
Mensajes: 558
Antigüedad: 23 años
Puntos: 0
Re: Update...

Por si acaso sirve de algo... ya intente cambiar estas lineas:

sSQL=&quot;UPDATE rotabla Set Rpregunta1a = &quot; &amp; Rpregunta1a &amp; &quot;, Rpregunta1b = &quot; &amp; Rpregunta1b &amp; &quot;, Rpregunta2 = &quot; &amp; Rpregunta2 &amp; &quot;, Rpregunta3 = &quot; &amp; Rpregunta3
oConn.execute (sSQL)

de esta manera:

set rschoiceo=Conn.execute (sSQL)

sSQL=&quot;UPDATE rotabla Set Rpregunta1a = &quot; &amp; Rpregunta1a &amp; &quot;, Rpregunta1b = &quot; &amp; Rpregunta1b &amp; &quot;, Rpregunta2 = &quot; &amp; Rpregunta2 &amp; &quot;, Rpregunta3 = &quot; &amp; Rpregunta3
oConn.execute (sSQL)

y sigue igual, pense que primero lo ejecutara y despues actualizara pero no.. tampoco.. manda otro tipo de error :( ayudenme por favor

Saludos Amigos

Owen Bonilla
Webmaster Weblaguna S. C.
[email protected]
[email protected]

  #8 (permalink)  
Antiguo 25/01/2002, 01:00
Avatar de g_susdaniel  
Fecha de Ingreso: mayo-2001
Ubicación: Frente al Monitor :þ
Mensajes: 995
Antigüedad: 23 años, 1 mes
Puntos: 0
Re: Update...

Creo que te está tirando el mismo error que a este:

<a href='ir.asp?http://www.forosdelweb.com/mensaje.asp?id=58909' target='_blank'>http://www.forosdelweb.com/mensaje.asp?i...</a>

<div align=right><embed src="http://www.jesusdaniel.venezuela.com/jd.swf" height=25 width=200 wmode="transparent"></embed><br>Usuario # 3359 en los foros</div>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:21.