Skip to content

ODBC Driver: temp tables #3499

@xakod

Description

@xakod

I try to use temp tables. If I create temp table and you use it in one Poco::Data::Statement, it will work. If I create temp table in one statement and use it in anoter, it will receive error [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name
For example:
It works

Poco::Data::Statement statement(*session);
statement << create_temp_table;
statement.execute();
statement << insert_into_temp_table;
statement.execute();

It doesnt

Poco::Data::Statement createStatement(*session);
createStatement<< create_temp_table;
createStatement.execute();

Poco::Data::Statement insertStatement(*session);
insertStatement<< insert_into_temp_table;
insertStatement.execute();

If I use different session it will be ok, but I use the same session. What I do wrong?

P.s. Full example available here https://github.com/Jihadist/PocoSqlTest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions