Title


I'm using DataSnap with FireDac TStoredProc to comunicate with server.

I'm sending STRINGS( querys ) to the server:

Ex1: ( INSERT )

Insert Into oses_pecas ( codigo,CODIEMP,CODIOS,CODIPROD,VALORUNIT,QTDE,TOTALPROD,OBS1,TIPOOS,DESCRICAO,CODICLI,VALOR_REAL,DATA,CODIFUNC1,DEVOLVIDO,CODICATEGORIA,PORTA ) Values ( 147117,1,67801,46,13,1,13,'C VERD',2,'FILE 2',10,13,'19.07.2016',2,'N',0,'\\RAFAEL-PC\TM-T81' )

Ex2: ( UPDATE )

The server show me this error:

#unit: FireDAC.Comp.Client
#erro: [FireDAC][Phys][FB]Dynamic SQL Error
SQL error code = -104
Unexpected end of command - line 2, column 52132555

What can I do ?

Comments

  1. hey guys...Thanks for help!! I've solved!!!

    I put a TRIM ( _query ) ... Only!!!

    ReplyDelete
  2. flavio motta what Asbjørn Heid said, I think, is: Your client should not send complete SQL sentences to be executed by the server. In a multi-tier application, the client should send the data, the server should validate the data and persist it to the database. There are several security implications when you send the whole SQL to be executed by the server.

    ReplyDelete

Post a Comment