Code Monkey home page Code Monkey logo

adrconnection's Issues

Como passar os parâmetros

Olá, achei fantástico o ADRConnection.
mas estou me batendo com uma situação:
Passei um SQL com parametro e ele não reconhece o mesmo.
Como é feito isso?
O SQLestá assim
vSQL = 'SELECT first(50) c.COD_CLIENTE cd_cliente, '+
' C.Razao_Social ds_razaosocial '+
' From Clientes C '+
' Where c.DELETADO = ''N'' '+
' and c.bloqueado = ''N'' '+
' and c.data_atualizacao >= :varDataAtualizacao '+
' Order by c.Cod_CLIENTE';
No Dataset faço assim:
LDataSet := FQuery
.SQL(vSQL)
.ParamAsDate('varDataAtualizacao',vData)
.Open;

Erro ao Incluir dados cujo campo no Select não pertence a tabela

Bom dia!
Estou relatando um erro que acontece no ADRConnetion.
O erro acontece quando vou INSERIR um registro quando um campo no select não pertence a tabela,
a rotina LDataSet.LoadFromJSON(AValue), entra em loop e não estoura a exception.
No meu caso estou usando o PostMan e nada é retornado, nem o Status.


function TDAOPADRAO.Insert(AValue: string): TJSONObject;
{$REGION 'SELECT'}
const
LSQL = 'SELECT ??????? IDTENACY, IDEMP, DTVENDA FROM MOVENDA WHERE 1 = 1';
{$ENDREGION}
var
LDataSet: TDataSet;
begin
Try
try
LDataSet := FQuery.SQL(LSQL).OpenDataset;

  LDataSet.LoadFromJSON(AValue);

  Result := LDataSet.ToJSONObject;
Except
  on E: Exception do
  Begin
    Result := TJSONObject.create;
    Raise Exception.create(E.Message);
  End;
end;

finally
LDataSet.free;
end;
end;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.