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.


Query Database trouble

Share

thuytien.ng

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

Query Database trouble

Post by thuytien.ng on 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

Youk

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

Re: Query Database trouble

Post by Youk on 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.
avatar
pavel.vraj

Posts : 74
Points : 788
Join date : 2016-11-04
Location : Prague, Czech Republic

Re: Query Database trouble

Post by pavel.vraj on 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

Youk

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

Re: Query Database trouble

Post by Youk on 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".
avatar
pavel.vraj

Posts : 74
Points : 788
Join date : 2016-11-04
Location : Prague, Czech Republic

Re: Query Database trouble

Post by pavel.vraj on 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

Youk

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

Re: Query Database trouble

Post by Youk on 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.


However, there are no variables in objectdb on Management Console.


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



Best Regards,
Youk
avatar
pavel.vraj

Posts : 74
Points : 788
Join date : 2016-11-04
Location : Prague, Czech Republic

Re: Query Database trouble

Post by pavel.vraj on 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
avatar
jking

Posts : 49
Points : 1757
Join date : 2014-03-01
Location : USA

Re: Query Database trouble

Post by jking on 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

Youk

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

Re: Query Database trouble

Post by Youk on 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.


Sponsored content

Re: Query Database trouble

Post by Sponsored content


    Current date/time is Wed Oct 17, 2018 11:14 am