cancel
Showing results for 
Search instead for 
Did you mean: 

CREATE TABLE does not work from JDBC test step

SOLVED
Highlighted
Occasional Contributor

CREATE TABLE does not work from JDBC test step

Hello SoapUI community

I have SQL Server DB.

When I execute the following JDBC test step it runs without any error:

drop table if exists ##GTA_PFile100_Precondition_Result;

create table ##GTA_PFile100_Precondition_Result
(
        checkResult nvarchar(2000)
)

insert into ##GTA_PFile100_Precondition_Result (checkResult) values ('Failed');

Request Log:

2019-08-06 16:08:23 - Sql executed: drop table if exists ##GTA_PFile100_Precondition_Result;

create table ##GTA_PFile100_Precondition_Result
(
        checkResult nvarchar(2000)
);

insert into ##GTA_PFile100_Precondition_Result(checkResult) values ('Failed');
2019-08-06 16:08:23 - response time: 3ms (54 bytes)

In result the only drop command was applied to the database. The create and insert commands were not.

There are similar topics and the solution is to use the grrovy script to execute sql commands. I am curious why drop is working but create is not. Could you pls help me with it?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: CREATE TABLE does not work from JDBC test step

Try creating separate test steps for each statement.

Each statement you send may produce a result set, so when SoapUI gets a result from the first statement, it stores it as the result of the test step and stops.

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Re: CREATE TABLE does not work from JDBC test step

Try creating separate test steps for each statement.

Each statement you send may produce a result set, so when SoapUI gets a result from the first statement, it stores it as the result of the test step and stops.

View solution in original post

Highlighted
Occasional Contributor

Re: CREATE TABLE does not work from JDBC test step

My fault. I was creating global temporary table which exists only until the current session is open. I will close this topic.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors