Questions tagged [odb]

ODB is an open-source, cross-platform, and cross-database object-relational mapping (ORM) system for C++.

ODB is an open-source, cross-platform, and cross-database object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any mapping code. ODB supports MySQL, SQLite, PostgreSQL, Oracle, and Microsoft SQL Server relational databases as well as C++98/03 and C++11 language standards. It also comes with optional profiles for Boost and Qt which allow you to seamlessly use value types, containers, and smart pointers from these libraries in your persistent C++ classes.

82 questions
0
votes
0 answers

making a digital dashboard using obd2 elm327 and pygame but screen is black when obd2 is put in the code the obd works on its own

a friend and i are making a digital dashboard on a rasspberry pi but we keep running into problem when combining the obd code and the pygame. sepertaly they wwork but together it is either pygame or obd that doesn't work. origanaly we tried doing it…
0
votes
1 answer

I'm getting error when I'm mapping atomic value with odb

I'm trying to use ODB, but I'm stuck with an error about std::atomic. I've read this : the same problem on odb mailing list So I tried to to define the odb::wrapper_traits specialization for std::atomic in file wrapper-traits.hxx. I did it this by…
Xavier
  • 41
  • 7
0
votes
0 answers

use of ORM with ODB in c++

I am trying to use ODB to work with SQLite database in c++. I found the below code in docs of ODB. when I replaced MySQL with SQLite I got error as no instance of constructor when trying to create persistent person objects. How can I make use of ODB…
stackunderflow
  • 187
  • 1
  • 4
  • 12
0
votes
0 answers

error comparing an input field to a value in a database

Trying to compare a value I get from an input field to a value in a database using mysql, and I get the error :Oracle.DataAccess.Client.OracleException: 'ORA-00911: invalid character' OracleCommand cmd2 = new OracleCommand(); …
GrEaTYeAt
  • 1
  • 1
0
votes
1 answer

What is the optimal way to count the number of results that would be returned by an ODB query?

I have a C++ application that uses ODB with an SQLite database. I would like to count the number of results that would be returned by any query. Currently, I am doing something like the following: using query = odb::query; auto…
Ian Gralinski
  • 109
  • 2
  • 13
0
votes
0 answers

Abaqus Python: How can I edit my script to read field output data at specific coordinates in an Abaqus odb file?

I would like to add to the script below to only write the element volumes at specific set coordinates in a 2D space e.g at (21,-11), (32,-32) etc. The reasoning behind this is; I would like to find the mass of material (modelled as a shell) in…
Ryan
  • 11
  • 1
  • 3
0
votes
2 answers

【MacOSX 10.15.1】Use odb generate database, fatal error: wchar.h: No such file or directory #include

odb -d mysql --generate-query --generate-schema person.hxx In file included from /usr/local/Cellar/odb-2.4.0-i686-macosx/lib/odb/i686-apple-darwin10/include/c++/4.9.3/bits/postypes.h:40:0, from…
Cronus
  • 1
0
votes
1 answer

problem when inserting chinese characters into mysql via C++ ODB

i am not a english speaker, pls be tolerant with my expression. When i insert some chinese characters into mysql 5.7 via odb, i got the error message "Incorrect string value: '\xD6\xD0\xB9\xFA' for column 'NATION' at row 1", i know it's the wrong…
icewill
  • 23
  • 3
0
votes
0 answers

how can ODB support CString in MFC

I'm trying use ODB in my program to save a class that contains CString type (a MFC variable type). When I compile the include file with ODB, it tell me the 'CString' does not name a type. There is 2 ways I think can solve it. I tried but…
kexuetutu
  • 1
  • 1
0
votes
2 answers

How do I add extra rows to an Excel sheet via ODBC?

I used ODBC to create a sheet in Excel and add a row to it. Literally the commands were just: create table 'update5' ('age' NUMBER); insert into 'update5'.'age' values (1); This works and I can see the rows in the sheet and via DBVisualiser and my…
Stefan
  • 3,669
  • 2
  • 32
  • 43
0
votes
0 answers

C++ error 'Undefined reference to odb::pgsql::database::database'

I'm trying to use odb for my first cpp project (based on progress database). I have installed everything i need and want to connect to my database. I wrote a simple instance for my database connection: #include #include…
Brainfail
  • 196
  • 1
  • 2
  • 11
0
votes
1 answer

OrientDB CRUD for large and nested data

I'm very new to OrientDB, I'm trying to create a structure to insert and retrieve large data with nested fields and I couldn't find proper solution or guideline. This is the structure of table I want to create: { UID, Name, RecordID, …
KishanRSojitra
  • 267
  • 3
  • 17
0
votes
1 answer

ODB invalid use of incomplete type ‘class odb::access::object_traits_impl

I write too simple odb example and copy all codes from document but when calling db.persist(john) compiler say /usr/include/odb/traits.hxx: In instantiation of ‘struct odb::object_traits_impl’: /usr/include/odb/database.txx:61:28: required…
MohsenTi
  • 361
  • 1
  • 2
  • 17
0
votes
1 answer

Difficulty Grouping and Aggregating Large Dataset

I'm having trouble working with a very large data set. I have an Item ID, Purchase Date, and Purchase Quantity. str(Output0) 'data.frame': 183847 obs. of 3 variables: $ D: Factor w/ 460 levels "2015-09-21","2015-09-24",..: 3 3 3 3 3 3 3 3 3 3…
Sutton Murray
  • 35
  • 2
  • 7
0
votes
1 answer

odb with MySQL sql-mode NO_AUTO_VALUE_ON_ZERO

I use MySQl with enabled sql-mode NO_AUTO_VALUE_ON_ZERO, which means that it's not possible to use 0 in INSERT statements for PK column to indicate MySQL that it should automatically assign value for PK. I have persistent object of following…
Pustovalov Dmitry
  • 998
  • 1
  • 9
  • 25