Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » ODBC Assertion failed
Re: ODBC Assertion failed [message #57092 is a reply to message #55812] Mon, 24 May 2021 14:54 Go to previous message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi there,
so, here's my test case.

The basic functioning of the test case is the following: an object of the class Order is created (there is a in the test case class that creates a fake order, in my application the order is entered by the user through a UI), the order is then converted in a ValueMap and finally is inserted in the DB using SqlIds and other facilities provided by U++. I use this database connection to integrate my application with an accounting software. This accounting software provides a special table of tye database to allow other software to insert data in it (i.e. I'm using the table of the accounting software for their designed purpose).

I'll try now to go through each class to explain the goal of each one.

The class Order (alongside with the class OrderRow) represents a customer order: it has the classic header/body structure.

The file TesDbSql.h contains definitions of the SqlIds used by Upp's Sql class (for insert etc.).

The class TestDAO contains the actual functions that save data into the database.

The class TestDocumentMapping transform an Order object into a ValueMap, so it can be easily processed by the DAO.

The CreateOrder class creates a fake order.

The util class contains some functions that I use to convert the Order object into a ValueMap.

Finally the Db.sql file contains the script used to create the test database.

The crash happens only when the application is compiled, not in debug mode. With the real ms sql database the behaviour is really "consistent": I can insert one order without problems, but, if I try to insert a second one immediately after I inserted the first, the application crashes. With the database included in my test case the behaviour is much more erratic. I noticed however that there are some patterns: if I enter some orders with the application, exits the application, delete the content of the tables in the db and then launch the application and insert an order again, the application usually crashes. It usually crashes even if I insert some orders, exit the application, launch it again and insert some new orders.

If you have additional question let me know.
Regards,
gio
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OleDBSession in Archive
Next Topic: sqlite3 Custom Function in SqlExp
Goto Forum:
  


Current Time: Wed Jun 25 09:50:21 CEST 2025

Total time taken to generate the page: 0.04983 seconds