Data is not database

Hello

Recently, I updated my momentics 10.3 10.2 momentics SDK. Now, I work with a database to get the data from database, but I don't get all the data from database.

QSqlQuery DBUtil::getTitles(QString catgName)
{
    QString name;
    QString query = "SELECT distinct(wall_name) FROM wallpaper_data WHERE wall_catg_name="+catgName;     qDebug()<<"catgName"<< catgName;
    QSqlQuery sqlQuery(query, mDb);
    while(sqlQuery.next())
    {
        name = sqlQuery.value(0).toString();
        qDebug()<<"title"<< name;
    }
 return name;

I'm getting the 'catgName' but I don't get the 'name' of the database.

But following works very well.

QSqlQuery DBUtil::getCategory()
{
    QString query = "SELECT distinct(wall_catg_name) FROM wallpaper_data";
    QSqlQuery sqlQuery(query, mDb);
    return sqlQuery;
}

Can anyone help me to get the data from database.

Thank you best regards &.

I can only humbly suggest you read my posts a bit more carefully. Or at least the API documentation.

QSqlQuery constructor gets the database.

Replace this

QSqlQuery query;

with

QSqlQuery query(mDb);

you run the query with exec(), undo the change.

Tags: BlackBerry Developers

Similar Questions

  • Writing data to a database

    Hello

    I created an application datalogging, but I had no joy at all try to write data in a database.

    The small attached vi creates a database in c:\DBase\ and then you can write the data into it. I get no errors at all from this code, but the database remains empty.

    I use 10 64-bit, LabView Pro 2016 32-bit Windows and now 2016 SQL Server 32-bit. I tried several versions of SQL server, the server is running and is configured ok.

    If anyone can spot a mistake in my application or can confirm this works ok on another version of LAbview or SQL would help greatly.

    Thank you

    OK, I now have this sort. Should be "insert" not "update".

    Too embarrassed to tell how long I was looking at this problem

    Thanks for the help.

    From and to the top

  • BlackBerry smartphones some of your data has not been saved

    Using BlackBerry Desktop Software 7.1.0.37 I get the following warning message after a return to the top of my BlackBerry Torch 9800 (version 6.0 of 2647 software bundle): 'some of your data has not been saved. Some data are not included in the file back. DataType: BlackBerry Messenger entered: 0/2 ".

    Hello and welcome to the community!

    Could the BBM Contacts... There are situations where those who are not properly saved with desktop software. Reference:

    • KB20554 How to back up and restore the BlackBerry Messenger contacts list

    If you moved to BBM 7, then your BBM contacts are saved "the cloud" as part of your association ID BB to BBM.

    Otherwise, you can compare the databases on your BB against what is contained in the backup file to determine exactly what is missing:

    • KB03974 List of database for the blackBerry smartphone

    You would need a 3rd party PC app to analyze and present you the backup file "readable" format to compare.

    FYI - for all recommendations and backup processes, see for more information:

    Good luck!

  • Insert data into another database with a script

    Hello.

    What is the best way to insert data into one database with a script

    INSERT INTO BF_PRUEBASMTP.bf_mtp_agr_inscription (ain_agreementid, ain_customerid, ain_paymethodsid, ain_servicemoduleid, referencia)

    SELECT AAG. AAG_AGREEMENTID, ACU. ACU_CUSTOMERID, 2, 2, ins. NUMERO_REFERENCIA

    OF BF_PRUEBASMTP.bf_mtp_agr_biller ABI

    JOIN IN-HOUSE

    BF_PRUEBASMTP. BF_MTP_AGR_AGREEMENT AAG ON ABI. ABI_BILLERID = AAG. AAG_BILLERID

    INNER JOIN 'CLIENTEUNICO. ALMUERZO" ins

    ON THE AAG. AAG_AGREEMENTID = ins. CONVENIOID

    INNER JOIN BF_PRUEBASMTP.bf_mtp_agr_customer ACU

    ON ACU.acu_typedocumentid = ins. TIPO_DOCUMENTO

    AND ACU.acu_numberid = ins. NUMERO_DOCUMENTO;

    CLIENTEUNICO. INSCRIPCIONES = SELECT * DE INSCRIPCIONES - to a DIFFERENT DATABASE


    Thank you very much.

    2931095 wrote:

    If I don't have permissions to create a database link. Is there another way to do this?

    Thank you.

    link to database IS the method by which an Oracle database accesses to a different database.

    If you are the ADMINISTRATOR, you should have permission.

    If you are not the ADMINISTRATOR, you should not have permission and need to talk to the ADMINISTRATOR that is allowed.

  • sqlplus: error while loading shared libraries: /opt/oracle/lib/libclntsh.so.11.1: ELF file data encoding not little-endian not

    Hello

    I get the error message below.

    We have made the correction but the suite spot not be able to start the database.

    sqlplus: error while loading shared libraries: /opt/oracle/u01/app/oracle/product/11.2.0.3/lib/libclntsh.so.11.1: ELF file data encoding not little-endian not

    Need your help in resolving this issue.

    Thank you

    Srinivasan R wrote:

    Hello

    FYI,.

    We have applied the fix for database only and there's OS patching.

    Thank you

    Srinivasan R

    Realize that Oracle provides the PATCH of the DATABASE for different versions of the OS & if you apply the patch to the database for the version of Solaris on a HP version.

    then the problems will result.

    If sqlplus worked without error before applying the patch & now ENDIAN error reports, problem exists between keyboard and Chair!

  • Current version of the data in the database has changed since the user has launched the process of update: tabular

    Hi people

    Version of the apex is 4.2

    Oracle database: 11.2.0.2

    I have created a simple form in a table on a table with the following structure

    {code}

    Name                                                  Null?    Type

    ----------------------------------------------------- -------- --------------

    TID NOT NULL NUMBER

    TEAM_NAME VARCHAR2 (30)

    EMP_NAME VARCHAR2 (30)

    DATE OF REPORT_DATE

    CATEGORY_NAME VARCHAR2 (30)

    NUMBER OF CATEGORY_HR

    CATEGORY_COMMENT VARCHAR2 (120)

    CREATED_DT                                                     DATE

    CREATED_BY VARCHAR2 (30)

    STATUS VARCHAR2 (1)

    {code}

    In the form of default table is

    {code}

    Select

    TID,

    TID TID_DISPLAY,

    TEAM_NAME,

    EMP_NAME,

    REPORT_DATE,

    CATEGORY_NAME,

    CATEGORY_HR,

    CATEGORY_COMMENT,

    CREATED_DT,

    CREATED_BY

    of ' #OWNER # '. " TIMESHEET.

    {code}

    I wanted to add an additional line inserted in the tabular presentation, that's why I included 'UNION ALL' in the query like this

    {code}

    Union of all the

    Select

    TID, null,

    tid_display null,

    team_name null,

    emp_name null,

    report_date null,

    category_name null,

    category_hr null,

    category_comment null,

    created_dt null,

    created_by null

    of the double

    {code}

    After having done that, I can see a blank line on the form of tables, but each time I fill data in the fields and press the "SUBMIT" button, I get the below error

    Current version of the data in the database has changed since the user has launched the process of update

    Thank you

    Navneet

    Why are you insert an extra line manually in tabular from?  There is a feature to add a line.

    If you want to insert a blank line when the page loads, then create dynamic action, this is a most appropriate feature.

    If you manually insert an extra line so that you have to write the update for this procedure.

    Leave.

  • ORA-01821: date format not recognized when you use the format TSH:TZM model

    Hi all

    Running on the Oracle 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production database

    I guess I am missing something here... but the following SQL code raises the exception ORA-01821.

    SELECT to_char(CAST(to_timestamp(SYSDATE) AS TIMESTAMP WITH LOCAL TIME ZONE),'YYYY-MM-DD"T"HH24:MI:SSTZH:TZM') as date_updated FROM DUAL;
    

    ORA-01821: date format not recognized

    01821 00000 - "date format not recognized".

    * Cause:

    * Action:

    If I change the model of TZDS or TZR time zone format... This works.

    SELECT to_char(CAST(to_timestamp(SYSDATE) AS TIMESTAMP WITH LOCAL TIME ZONE),'YYYY-MM-DD"T"HH24:MI:SSTZD') as date_updated FROM DUAL;
    

    2013-09 - 04T 13: 24:16EDT

    I need to format a date in a date in the correct format with time zone for an Atom (RFC3339) feed

    for example. 2013-09 - 04T 14: 11:09 - 05:00

    I do not know why the TZH:TZM triggers the error...

    Database NLS settings have anything to do with it?

    NLS_TIME_FORMAT = HH.MI. SSXFF AM

    NLS_TIMESTAMP_FORMAT = DD-MON-RR HH.MI. SSXFF AM

    NLS_TIME_TZ_FORMAT = HH.MI. SSXFF AM TZR

    NLS_TIMESTAMP_TZ_FORMAT = DD-MON-RR HH.MI. SSXFF AM TZR

    Thanks for the help

    If you want to change the display format, can you use to_char with the expected format

    SELECT to_char (TO_TIMESTAMP_TZ (to_char (sysdate,' YYYY-MM-DD HH), "YYYY-MM-DD HH:MI:SSTZH:TZM"), "YYYY-MM-DD"T"HH:MI:SSTZH:TZM") t1d FROM DUAL;

  • ORA-01821: date format not recognized in PL/SQL report - 4.0

    Hello


    I use Apex 4.0 and I have a classic report (return of function application) which allows you to select a date column.
    The query runs in the background and gives the result.

    But when I run the report on the page, I get the error
     report error:
    ORA-20001: Error fetching column value: ORA-01821: date format not recognized
    The values for the column are like this 14-MAR-13, 01-FEB-13, etc... Everything seems to be good.

    But I don't know why this error occurs.

    Thank you
    Adkins

    Divya says:

    Yes, this is a database column, and the data type is Date.

    The I used to convert the format is to_date(inv_date,'dd-mm-yy').

    My format of the Date of the application is "DD-MON-YYYY '.

    If the column type is date, then DO NOT use to_date. To format the date, either use the format column (which is strongly recommended) or to_char mask in the query:

    to_char(inv_date, 'dd-mm-yy')
    

    It is not recommended the use of the 2-digit year formats.

  • copy data from one database to another

    Hello

    I want to copy data from one database to another.

    I have two patterns such as

    dev1/dev@ORCL
    DEV2/dev@DCEL


    I have same tables dev1 and dev2 (tables)
    but I have not given in dev2 (tables).
    now, I want to copy dev1 (tables) in dev2 (tables).

    You can also use the database link:

    select * from dev1.emp@orcl;
    

    What database are you connected to?
    You must create and use the links in the database for all other databases.

    For example if you are connected to the database A and to retrieve data from database B, you must create a connection of database in base B

    create database link B connect to  identified by  using 'B';
    

    Then you can retrieve data from database B with

    select * from [yourschema.]yourtable@B;
    

    This will work only for tables that are visible to the user that you used in the definition of database link.

    Published by: hm on 10.08.2011 22:15

  • How to insert data into the database using smartview

    Hello
    I am trying to insert data into the database using * "Send data" * button on the Ribbon of Essbase.
    My database is empty.

    I opened an ad hoc network, it returns * "#missing" * in all cells
    I have modified the cells and provided data in the cells that I want to. Now, I supported on * "Send data" * button.
    It just reloaded the adhoc grid instead of submit data, I rechecked the data through data console Administrative Service are not inserted.

    I am following the right way to insert data? If not, could you please suggest me how (Populate) insert default data in the database?

    --
    VINET

    You go about it the right way, once you have submitted if you réactualisiez then data values should be there, if you POV is against members of dynamic calc and then data not written to the database, you need to check the Member properties of your POV.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Why the data in my database disappears when I restart Tomcat?

    I have a DPL Berkeley DB database that I use for a Web application that is running under Tomcat. I can store data in the database and get it back, but when I restart Tomcat and the data have gone. In my view, that the problem is that the data is in memory, it is never written to disk, so it is not persistent across reboots. I think that this, because when I write the data to the database, the size of the files in the data files does not change.

    My database is not transactional, nor in writeback mode.

    What else could cause this problem? I'm completely stumped.

    If the environment/store is not transactional (you do not call setTransactional (true)), then the data can be sustainable only equal to 1) you call Environment.sync, 2) a control point is executed by the thread of checkpointer I background or your application, 3) you close the environment itself, that will make a control point.

    I suspect that you do not close the environment when you shut down your server.

    You can take a look at the writing transactional Applications. He described the durability more in detail.

    -mark

  • Upload data to the database

    Hi all

    I have a problem with my request. I've created a sample application that I can show you my problem. I want my application to download data from database to the data grid - as ´s ok. But when I want toload data from database of the data grid, it doesn´t work - when I click on Update button, in early doesn´t of database connection. I use Wamp Server 2 to communicate with the database.

    I think that there is not problem in my source code (I checked so many examples). I think there is a problem with the Zend Framework - I'll try to explain this problem.

    I found that request not to upload data to the database when the folder structure is - look at photo. It is automatically created service in service folder - in my case Tabulka1Service). But what is confusing is that application downloads data from database without any problem:

    Capture1.PNG

    Request only download data from database when I move all the items to a folder of service - look at the picture. After that when I click the button it starts to connect to the database and downloads the data correctly.

    Capture.PNG

    Why I ask you to help me with this problem?

    Because I think it is very bad practice to move items to the folder of service whenever I created new service - I have to completely reconfigure entire service after that - and his loss of time I think.

    I would be happy for all the help.

    Thank you

    Try

    tabulka1 = dataGrid.selectedItem as valueObjects:Osoba

    But u declare

    Tabulka1 id="tabulka1"/>
    

    your dataGrid consists of a crowd of valueObject:Tabuka1 or valueObject:Osoba?

    Here are the various objects you can not their equal.

    It is a good tutorial on youtube, just look at

    http://www.YouTube.com/view_play_list?p=D7BB0C9BF6C87881&playnext=1&v=x-Da1SD1Ykk

  • Duplicate validation of levels page to prevent the entry of the data in the database

    Hello

    Can someone please help me with this problem.

    I have a form with two items based on a table. I already have a validation level step to check for null. Now, I would like to create a page-level validation to verify that the duplicate data are not recorded in the database. I would check the database when the user clicks on the button 'create' to ensure that they are not insert record in doubles. If the data already exists, then display the error message and redirect them to another page. I use apex 3.2
    Thank you

    Hello

    Have you tried to write a PLSQL function to check for this?

    I've not tested this precisely, but something like this should work:

    (1) create a Page-level Validation
    (2) choose PLSQL for method
    (3) select function that returns a Boolean for the Type

    For the validation code, you could do something like this:

    DECLARE
    
        v_cnt number;
    
    BEGIN
    
        select count(*)
        into v_cnt
        from
        your_table
        where
        col1 = :P1_field1 AND
        col2 = :P2_field2;
    
        if v_cnt > 0 then return false;
        else return true;
        end if;
    
    END;
    

    If the query returns false, your error message will be displayed.

    Not sure how you would address redirection after this page well. Maybe just allow the user to try again with a different value (in case they made a mistake), or simply press a "Cancel" button to finish creating a new record.

    Amanda.

  • Dates does not

    Hi guys,.

    I am runing under query on the database and it does not work

    can someone please help

    Select itl.date_stamp

    itl inventory

    where to_date(itl.date_stamp,'DD-MMM-YYYY') > = to_date('01-MAR-2010','DD-MMM-YYYY') and to_date(itl.date_stamp,'DD-MMM-YYYY') < = to_date('31-Mar-2010','DD-MMM-YYYY')

    That is to say

    ORA-01821: date format not recognized
    01821 00000 - "date format not recognized".

    Try MY instead of MMM

  • Current version of the data in the database has changed...

    Hi, I have an updated report which hurts...

    This is the SQL code for it:

    Select
    "ITEM_BOM_LINE_ID,"
    "ITEM_BOM_ID,"
    "ITEM_ID",.
    "ID_PROCESSUS,"
    "SEQ,"
    DECODE (ID_PROCESSUS, NULL, QUANTITY, ") AMOUNT.
    DECODE (ID_processus, NULL, UOM_CODE, ") uom_code,.
    "VOLTAGE_PROBE,"
    'POSITION ',.
    "POS."
    "DESCRIPTION".
    of ' #OWNER # '. " TOFC_ITEM_BOM_LINES ".
    where "ITEM_BOM_ID" =: P20_ITEM_BOM_ID

    In that select it the ID_processus or the item_id is defined. Cannot assign at the same time.

    The description field is what hurt. When I run the page and try to write something in the description field on a line where ID_processus is defined this error appears:

    Internal error in the routine mru: ORA-20001: error in MRU: line = 1, ORA-20001: ORA-20001: current version of the data in the database has changed since the user has launched the process of update. current checksum = "B54E29267EC18630B58818FF4B710D41" element = '925466414031BD2DE082A6F954889340' checksum., update of "trailers". "" TOFC_ITEM_BOM_LINES ""ITEM_BOM_LINE_ID"= value: b1, 'ITEM_BOM_ID' =: b2, 'ITEM_ID' =: b3, 'ID_processus' =: b4,"SEQ"=: b5, 'QUANTITY' =: b6, 'UOM_CODE' =: b7, 'DESCRIPTION' =: b8

    It works fine when I write something in the description field on a line where item_id is not null. Also all other fields work perfectly.

    Can someone tell me whats wrong?

    Thanks :)

    Hello

    After a re-read of your OP, I noticed that
    DECODE (ID_PROCESSUS, NULL, QUANTITY, ") AMOUNT.
    DECODE (ID_processus, NULL, UOM_CODE, ") uom_code,.
    in your query.
    And it breaks when ID_processus is NOT NULL (and ITEM_ID is null), isn't?
    That's because you change (sort of) the QUANTITY and the UOM_CODE when that happens. Your query retrieves different values than those contained in the database (for example "instead of the actual value). And these 'new' values are compared with the values of database and then there is a difference. Where the error.

    But now: how to solve?
    What exactly are you trying to achieve with this construction? Is there a business rule that AMOUNT and UOM_CODE must be blank if ID_processus is not null? To add a constraint validation to your table and just show the values in your table. Or to show or hide a value of the terms of use. Or use another (made) column in your query that is not bound to a database field.

    I hope this helps...

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

Maybe you are looking for