Announcement

Collapse
No announcement yet.

help: chunk has too many syntax lebel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • KELLYRUTH
    replied
    Thank You - Thank You

    Leave a comment:


  • Imagine Programming
    replied
    You're doing too many concatenations in a single statement. Lua does not like that, you need to split up the query in several statements or write a query builder.

    Leave a comment:


  • KELLYRUTH
    replied
    Text File Code
    Attached Files

    Leave a comment:


  • KELLYRUTH
    started a topic help: chunk has too many syntax lebel

    help: chunk has too many syntax lebel


    I hope to receive help with this error that has jumped me when wanting to make an INSERT in a Table. Error : Line = 280 chunk has too many syntax lebel I've been reading and lua has problems when the table has many fields sure there is a limit on it or I'm wrong When you generate a long string using the Lua concatenation operator "..", you may get this error. Chunk has too many levels of syntax. It seems that the error occurs after the 218th instance of the operator ".." in a single string assignment (but you should not rely on this as a fixed limit). This error should be quite rare, since you will often not need to concatenate 218 or more elements into a single string. However, a case in which it may occur is if you are creating a very complex SQL query that uses hundreds of fields. In fact, this error was originally produced when generating a very complex SQL INSERT statement for a ***A. Here you can see the error after instance 218 of the operator "..": SQLite.Query(db, "INSERT IGNORE INTO Facturas values(NULL, '" ..sFactura.."', '" ..sFecha.."', '" ..sHora.."', '" ..sImpuesto.."', '" ..sCliente.."', '" ..sDireccion.."', '" ..sVendedor.."', '" ..sCodigo1.."', '" ..sDescripcion1.."', '" ..sMarca1.."', '" ..sModelo1.."', '" ..sUnidad1.."', '" ..sNeto1.."', '" ..sImporte1.."', '" ..sExistencia1.."', '" ..sCodigo2.."', '" ..sDescripcion2.."', '" ..sMarca2.."', '" ..sModelo2.."', '" ..sUnidad2.."', '" ..sNeto2.."', '" ..sImporte2.."', '" ..sExistencia2.."', '" ..sCodigo3.."', '" ..sDescripcion3.."', '" ..sMarca3.."', '" ..sModelo3.."', '" ..sUnidad3.."', '" ..sNeto3.."', '" ..sImporte3.."', '" ..sExistencia3.."', '" ..sCodigo4.."', '" ..sDescripcion4.."', '" ..sMarca4.."', '" ..sModelo4.."', '" ..sUnidad4.."', '" ..sNeto4.."', '" ..sImporte4.."', '" ..sExistencia4.."', '" ..sCodigo5.."', '" ..sDescripcion5.."', '" ..sMarca5.."', '" ..sModelo5.."', '" ..sUnidad5.."', '" ..sNeto5.."', '" ..sImporte5.."', '" ..sExistencia5.."', '" ..sCodigo6.."', '" ..sDescripcion6.."', '" ..sMarca6.."', '" ..sModelo6.."', '" ..sUnidad6.."', '" ..sNeto6.."', '" ..sImporte6.."', '" ..sExistencia6.."', '" ..sCodigo7.."', '" ..sDescripcion7.."', '" ..sMarca7.."', '" ..sModelo7.."', '" ..sUnidad7.."', '" ..sNeto7.."', '" ..sImporte7.."', '" ..sExistencia7.."', '" ..sCodigo8.."', '" ..sDescripcion8.."', '" ..sMarca8.."', '" ..sModelo8.."', '" ..sUnidad8.."', '" ..sNeto8.."', '" ..sImporte8.."', '" ..sExistencia8.."', '" ..sCodigo9.."', '" ..sDescripcion9.."', '" ..sMarca9.."', '" ..sModelo9.."', '" ..sUnidad9.."', '" ..sNeto9.."', '" ..sImporte9.."', '" ..sExistencia9.."', '" ..sCodigo10.."', '" ..sDescripcion10.."', '" ..sMarca10.."', '" ..sModelo10.."', '" ..sUnidad10.."', '" ..sNeto10.."', '" ..sImporte10.."', '" ..sExistencia10.."', '" ..sCodigo11.."', '" ..sDescripcion11.."', '" ..sMarca11.."', '" ..sModelo11.."', '" ..sUnidad11.."', '" ..sNeto11.."', '" ..sImporte11.."', '" ..sExistencia11.."', '" ..sCodigo12.."', '" ..sDescripcion12.."', '" ..sMarca12.."', '" ..sModelo12.."', '" ..sUnidad12.."', '" ..sNeto12.."', '" ..sImporte12.."', '" ..sExistencia12.."', '" ..sCodigo13.."', '" ..sDescripcion13.."', '" ..sMarca13.."', '" ..sModelo13.."', '" ..sUnidad13.."', '" ..sNeto13.."', '" ..sImporte13.."', '" ..sExistencia13.."', '" ..sCodigo14.."', '" ..sDescripcion14.."', '" ..sMarca14.."', '" ..sModelo14.."', '" ..sUnidad14.."', '" ..sNeto14.."', '" ..sImporte14.."', '" ..sExistencia14.."', '" ..sCodigo15.."', '" ..sDescripcion15.."', '" ..sMarca15.."', '" ..sModelo15.."', '" ..sUnidad15.."', '" ..sNeto15.."', '" ..sImporte15.."', '" ..sExistencia15.."', '" ..sCodigo16.."', '" ..sDescripcion16.."', '" ..sMarca16.."', '" ..sModelo16.."', '" ..sUnidad16.."', '" ..sNeto16.."', '" ..sImporte16.."', '" ..sExistencia16.."', '" ..sCodigo17.."', '" ..sDescripcion17.."', '" ..sMarca17.."', '" ..sModelo17.."', '" ..sUnidad17.."', '" ..sNeto17.."', '" ..sImporte17.."', '" ..sExistencia17.."', '" ..sCodigo18.."', '" ..sDescripcion18.."', '" ..sMarca18.."', '" ..sModelo18.."', '" ..sUnidad18.."', '" ..sNeto18.."', '" ..sImporte18.."', '" ..sExistencia18.."', '" ..sFechaRegistro.."')");
Working...
X