KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


4 posters

    Query Database trouble

    avatar
    thuytien.ng


    Posts : 1
    Points : 2168
    Join date : 2018-05-23

    Query Database trouble Empty Query Database trouble

    Post by thuytien.ng Mon May 28, 2018 2:31 pm

    I am building the second robot and use Query Database to get the URL from the first robot to run. However when I run the robot, it shows 'Error from the Query Database action. Invalid object name 'robot.the first robot'.

    I run the first robot to store some data in Datawarehouse for Query in the second robot. But I dont know I still get invalid object name. 

    Could you please tell me why? Thanks
    avatar
    Youk


    Posts : 4
    Points : 2163
    Join date : 2018-05-29
    Location : Japan

    Query Database trouble Empty Re: Query Database trouble

    Post by Youk Tue May 29, 2018 2:19 pm

    Hi, thuytien.ng
    Actually I have same trouble. 

    Dear everyone of experts,
    Please tell us how to resolve this problem.
    pavel.vraj
    pavel.vraj


    Posts : 86
    Points : 2822
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Query Database trouble Empty Re: Query Database trouble

    Post by pavel.vraj Thu May 31, 2018 4:17 pm

    Hi,
    what version are both of you using?
    what type are you using to store the variable?
    BR, Pavel
    avatar
    Youk


    Posts : 4
    Points : 2163
    Join date : 2018-05-29
    Location : Japan

    Query Database trouble Empty Re: Query Database trouble

    Post by Youk Fri Jun 01, 2018 12:00 pm

    Hi, pavel

    Thanks for reply.
    I'm using "Kapow 10.2.0.3" and using the type with "Short Text" or "Long Text".
    pavel.vraj
    pavel.vraj


    Posts : 86
    Points : 2822
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Query Database trouble Empty Re: Query Database trouble

    Post by pavel.vraj Fri Jun 01, 2018 2:14 pm

    Hi,
    I mean can you attach the type here and the configuration of the Query step? At least screenshots.
    BR, Pavel
    avatar
    Youk


    Posts : 4
    Points : 2163
    Join date : 2018-05-29
    Location : Japan

    Query Database trouble Empty Re: Query Database trouble

    Post by Youk Mon Jun 04, 2018 9:54 am

    Hi,
    Thank you for replying.

    First robot execute step "Store in Database".
    I defined Short Text and Long Text as ".type".
    I tried this robot on the debug mode, but there are no errors.
    Query Database trouble Step0110

    However, there are no variables in objectdb on Management Console.
    Query Database trouble Step0210

    And then, 2nd robot tried to execute "Find in Database" and displayed that error.
    (Screenshot below)

    Query Database trouble Cap_0610

    Best Regards,
    Youk
    pavel.vraj
    pavel.vraj


    Posts : 86
    Points : 2822
    Join date : 2016-11-04
    Location : Prague, Czech Republic

    Query Database trouble Empty Re: Query Database trouble

    Post by pavel.vraj Mon Jun 04, 2018 2:11 pm

    Hi,
    can you also place the screenshot of the type? What fields are set as keys?
    BR, Pavel
    jking
    jking


    Posts : 103
    Points : 3850
    Join date : 2014-03-01
    Location : USA

    Query Database trouble Empty Re: Query Database trouble

    Post by jking Thu Jun 07, 2018 4:24 am

    The Store In Database step only works when storing in a Database on Management Console.  It acts the same as an Insert Into SQL Statement.
    If you are not trying to update a table in Management Console, you will need to use an Execute SQL step and use an Insert Into or Update SQL Statement.

    In order to Store In Database you need a Type and you need to Create a Database Table in a Database on Management Console.

    Add new Type
    Name Type
    Add Attributes
    Save Change
    NB: You must have a Database Key included in your type.

    Click Tools → Create Database Table
    In the Database drop-down Option, Select the Database where you want your Table Created (a database on management console)
    Click the Check Box next to your Type
    Click Generate SQL
    Kapow will auto-generate a CREATE TABLE sql statement based on the Attributes added above.
    Click Execute
    Click Close

    Go To Management Console → Data Tab and check that the Type was added as a new Database Table.

    Refresh your Robot. 
    Add the Type you created as a Variable. I would suggest that you name the Variable the same name as your Type/Table.
    Click OK
    (Click Execute in Design Mode if you want the Store In Database Step to execute in Design.

    When you step pass the Store In Database the value(s) assigned to the Type in the Robot will appear in the Table in Management Console.

    To use the stored data in robot two, you will query the table you created from your type.
    Database is the database from Management Console
    Select * from TableName where, etc.

    In the Save in Database Step:
    Database is the Database on Management Console where you created your Table from your Type
    Variable: The Type you Created
    avatar
    Youk


    Posts : 4
    Points : 2163
    Join date : 2018-05-29
    Location : Japan

    Query Database trouble Empty Re: Query Database trouble

    Post by Youk Mon Jun 18, 2018 2:33 pm

    Hi,
    I'm so sorry for late reply.
    From the conclusion, I could do it by using "Query Database" command.

    Query Database trouble Cap06110

    Sponsored content


    Query Database trouble Empty Re: Query Database trouble

    Post by Sponsored content


      Current date/time is Sat Apr 27, 2024 3:28 am