Tengo la formulación en Oracle, pero no genera la planilla porque obtengo este error:

> Oracle.DataAccess.Client.OracleException
> ORA-06550: line 1, column 6:
> PLS-00103: Encountered the symbol ""
> when expecting one of the following:
> 
>    begin case declare exit for goto if
> loop mod null pragma    ...    close
> current delete fetch lock insert open
> rollback    savepoint set sql execute
> commit forall merge pipe The symbol ""
> was ignored.

Ya busqué posibles causar pero aún no lo he podido resolver. ¿Alguna idea?

asked 30 Jul '13, 18:08

Carlos%20Reyes's gravatar image

Carlos Reyes
(suspended)
accept rate: 43%

edited 30 Jul '13, 20:48

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635


Se ingresó como Issue (#1075) para revisión y se encontró que se podía modificar el fuente para que Oracle no se confundiera con los "line breaks" (CR/LF para Windows) (CR para Unix/Linux).

La corrección está disponible en la versión 1.7.2.0


La investigación que hizo Carlos Reyes concluyó que el manejo de los "line breaks" era el problema. Y nos proporcionó esta documentación:


Surprisingly, Oracle can be quite picky about what characters it accepts as legitimate line breaks. In Windows, a line break is typically a carriage return (CR), line-feed pair (LF) pair; while on Unix and Linux platforms, line breaks are represented just by a carriage return. Unfortunately, depending on where your script content originates, you may inadvertently have CR/LF pairs in it. Most often, this would be the case if you read your SQL script from a file or an embedded resource – where the normal encoding would use CR/LF. Unfortunately, the error message you get from Oracle isn’t very helpful if you run into this situation:

Initialization method Tests.AnonymousBlock.TestScript threw exception: Oracle.DataAccess.Client.OracleException: Oracle.DataAccess.Client.OracleException: ORA-06550: line 1, column 6: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with [an identifier] [a double-quoted delimited-identifier] [a bind variable] close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe.

While I haven’t been able to find any definitive documentation, empirical testing shows that Oracle will accept a CR as line break but not necessarily a CR/LF pair. To be safe, I replace CR/LF pairs with CRs before using them:

command.CommandText = sql.Replace("rn", "n");

link

answered 01 Aug '13, 00:24

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635
accept rate: 51%

Carlos, es un error de sintaxis, así de simple.

Por eso no has hallado nada que te oriente, porque es tan simple como que el código Oracle no compila.

link

answered 30 Jul '13, 20:50

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635
accept rate: 51%

Mmmm pero el paquete está compilado y si ejecuto el procedimiento desde el TOAD, se ejecuta correctamente y hace lo que debe hacer.

(30 Jul '13, 20:54) Carlos Reyes Carlos%20Reyes's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Evolution en BitBucket

En este sitio puede acceder al código fuente, centro de descargas y reportar bugs, propuestas y mejoras para Evolution.

Evolution en JIRA

En este sitio puedes sugerir nueva funcionalidad para Evolution, o puedes votar por la funcionalidad ya propuesta por otros usuarios.

Tags:

×13
×11
×6

Asked: 30 Jul '13, 18:08

Seen: 8,135 times

Last updated: 01 Aug '13, 00:24

[Acerca de] [Preguntas Frecuentes] [Privacidad] [Soporte] [Contacto]
Copyright 2013-2018. Asesores en Informática