You are not logged in.
Pages: 1
Great,
it now works,
Thanks!
Hello,
I have a backend for an Android app that worked without problems when running this code:
FOrden := TOrdenProduccion.CreateAndFillPrepare(DBController.CMain, 'NroOrden=? AND EsMatriz=0 AND IdMaquina=0 '
+ '/*nocache*/', [lIdOrdenStr])
this doesn't work anymore since the commit of 15-01-21 (fixed TSynTableStatement parsing), and it seems that the /*nocache*/ isn't parsed in the same way as before.
should I avoid using nocache there?
Thanks
Michael,
thanks for your complete explanation and the connection param. Right now the small backend entered production using SynOledb connection and it's serving without any problem. There's a plan to move mssql to linux, so probably I'll revisit it later and try again using zeos.
Claudio.
Hi,
I'm getting an EAssertionFailed: "You should call TOleDBConnection.Free from the same thread which....". As it's stated on the documentation, I've implemented the OnHttpThreadTerminate event:
HttpServer.OnHttpThreadTerminate := FOnThreadTerminate;
then,
procedure THTTPTerminals.FOnThreadTerminate(sender: TThread);
begin
FDBMain.ConProp.EndCurrentThread;
FDBProd.ConProp.EndCurrentThread;
end
the strange behaviour is that if I call the server, it works without any trouble, but, if I left the server running without making any call for some time, then, the first call after that pause throws that assertion, and subsecuents calls works without throwing that assertion.
probably I should say that I've to extend a legacy system which has two databases. I know that this isn't an ideal situation, but, it what i have. So, i'm using two connections, each one with his own model.
Thanks
Under Linux you can use TODBCConnectionProperties from SynDBODBC + ms odbc driver or FreeTDS. I test both. On production I use msodbcsql17
Thanks for the tip. I'll give a try.
Thanks for your reply, I'll use TOleDBMSSQL2012ConnectionProperties as you suggested.
I wanted to use Zeos because there's a migration to linux planned, so I tought that would be easier the transition when that happens.
Hi,
I'm working on a backend for a mobile app, which must extend an old production system. Connected the mssql using Zeos connection and SQLNCLI native client. I get a strange error when I run this query:
SELECT art.IdArticulo,
art.Descripcion, art.UniMedida, art.LlevaStock,
ISNULL((SELECT SUM(ingreso-egreso) FROM vtainventario inv
WHERE inv.idarticulo=art.idarticulo
AND IdDeposito = ?), 0) AS Stock,
sect.Descripcion as Sector,
ISNULL(sect.CodSector, 0) as CodSector
FROM COMVTAARTICULO art
LEFT JOIN vtasectorarticulo sect
ON (art.codsectorvta = sect.CodSector)
WHERE art.IdArticulo = ?
Error: oledb error sqlstate: 42000 native error: error message: syntax error, permission violation, or other nonspecific error..
I then changed the connection to TOleDBMSSQL2012ConnectionProperties and it worked without problems.
the line of zeos that throws the error is: line 1447, unit ZDbcOleDbStatement
if fDEFERPREPARE and (fCommand.QueryInterface(IID_ICommandPrepare, CommandPrepare) = S_OK) then begin
I didn't know if report it on zeos forum or here. sorry if this is not the correct place to report.
Thanks!
Pages: 1