Output Old Version
@p1: 000000020001
@p2: 17/9/2546 11:26:17
@p3: 3/11/2547 17:50:13
@p4: 1
@p5: Customer 1
@p6: 1
@p7: Australia
UPDATE Customers SET oid=?, CreatedDate=?, ModifiedDate=?, CustomerId=?, Description=?, ContactName=?, Country=? WHERE Customers.oid = "000000020001" AND Customers.CreatedDate = #09/17/03 11:26:17# AND Customers.ModifiedDate is NULL
Output Version 2.0 RC1
BEGIN TRANSACTION
Nested BEGIN TRANSACTION - Not called
Saving object CCustomer
@p1: 000000020001
@p2: 17/9/2546 11:26:17
@p3: 3/11/2547 17:28:19
@p4: 1
@p5: Customer 1
@p6: 1
@p7: Australia
@p8: 000000020001
@p9: 17/9/2546 11:26:17
@p10: NULL
UPDATE Customers SET oid=?, CreatedDate=?, ModifiedDate=?, CustomerId=?, Description=?, ContactName=?, Country=? WHERE Customers.oid = ? AND Customers.CreatedDate = ? AND Customers.ModifiedDate = ?
Nested ROLLBACK TRANSACTION - Not actually called
ROLLBACK TRANSACTION
An unhandled exception of type 'AToMSFramework.SaveException' occurred in atomsframework.dll
coz. is ModifiedDate
Anyakit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is not a bug but rather new behaviour to help improve the SQL back end performance. By keeping the SQL statements the same the server will not need to compile statements it has already processed.
The poroblem you have is the handling of ANSI Nulls in the SQL Server.
Simply add the following to your database declaration:
Output Old Version
@p1: 000000020001
@p2: 17/9/2546 11:26:17
@p3: 3/11/2547 17:50:13
@p4: 1
@p5: Customer 1
@p6: 1
@p7: Australia
UPDATE Customers SET oid=?, CreatedDate=?, ModifiedDate=?, CustomerId=?, Description=?, ContactName=?, Country=? WHERE Customers.oid = "000000020001" AND Customers.CreatedDate = #09/17/03 11:26:17# AND Customers.ModifiedDate is NULL
Output Version 2.0 RC1
BEGIN TRANSACTION
Nested BEGIN TRANSACTION - Not called
Saving object CCustomer
@p1: 000000020001
@p2: 17/9/2546 11:26:17
@p3: 3/11/2547 17:28:19
@p4: 1
@p5: Customer 1
@p6: 1
@p7: Australia
@p8: 000000020001
@p9: 17/9/2546 11:26:17
@p10: NULL
UPDATE Customers SET oid=?, CreatedDate=?, ModifiedDate=?, CustomerId=?, Description=?, ContactName=?, Country=? WHERE Customers.oid = ? AND Customers.CreatedDate = ? AND Customers.ModifiedDate = ?
Nested ROLLBACK TRANSACTION - Not actually called
ROLLBACK TRANSACTION
An unhandled exception of type 'AToMSFramework.SaveException' occurred in atomsframework.dll
coz. is ModifiedDate
Anyakit
I have the same mistake,
Saving object PedidoVenta
@p1: 220
@p2: 2
@p3: 3
@p4: 2
@p5: 1
@p6: 4
@p7: 2
@p8: 66666
@p9: 01/01/2004 0:00:00
@p10: 0
@p11: 0
@p12: 0
@p13: 0
@p14: 0
@p15: 0
@p16: Pedido
@p17: 03/11/2004 17:39:32
@p18: 03/11/2004 17:43:06
@p19: 220
@p20: 03/11/2004 17:39:32
@p21: NULL
UPDATE pedidoventa SET CodigoPedidoVenta=?, CodigoCliente=?, CodigoFormaPago=?, CodigoFormaEnvio=?, CodigoTipoEstado=?, CodigoTipoPorte=?, CodigoAlmacen=?, NumeroPedidoVenta=?, Fecha=?, Descuento=?, GastosVarios=?, Bruto=?, Total=?, Porte=?, CodigoDocumentoAsociado=?, TipoDocumento=?, CreatedDate=?, ModifiedDate=? WHERE pedidoventa.CodigoPedidoVenta = ? AND pedidoventa.CreatedDate = ? AND pedidoventa.ModifiedDate = ?
Nested ROLLBACK TRANSACTION - Not actually called
ROLLBACK TRANSACTION
I think that This mistake is because MODIFIEDDATE=null dosn't correct.
saludos
Victor (Madrid - Spain)
This is not a bug but rather new behaviour to help improve the SQL back end performance. By keeping the SQL statements the same the server will not need to compile statements it has already processed.
The poroblem you have is the handling of ANSI Nulls in the SQL Server.
Simply add the following to your database declaration:
<database ....>
...
<parameter name="ansinulls" value="true" />
</database>
This will activate ansinull behaviour and produce "field is NULL" clauses instead of "field = ?"
Alternatively you can execute "SET ANSI_NULL OFF"
in SQL (syntax may change depending on your server)
Also, I would recommend getting the latest CVS release since I had the logic for this around backwards in a few places :-(
- Richard.
Your sample db is ms access. How can i do?
Thank you.
Anyakit
I can do it now.
Thank you agian.
Anyakit
- Microsoft Access
- Open sample1.db database
- Tools - Options - Advance Tab.
set Access 2002