Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.databases.ms-sqlserver > #2161

Creating a table in spite of browse mode

Path csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Anton Shepelev <anton.txt@g{oogle}mail.com>
Newsgroups comp.databases.ms-sqlserver
Subject Creating a table in spite of browse mode
Date Tue, 18 Oct 2022 15:09:20 +0300
Organization A noiseless patient Spider
Lines 34
Message-ID <20221018150920.2c192912e8cb7da6002b965f@g{oogle}mail.com> (permalink)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Injection-Info reader01.eternal-september.org; posting-host="140417b6c7466ef785dd98e1558d8719"; logging-data="3928518"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nJpa/aBHn6zgoU+vk/kdS4OTafVe8gDk="
Cancel-Lock sha1:CW0xCwWT52UFW3xHoaVf2FQ8RCg=
X-Newsreader Sylpheed 3.5.0 (GTK+ 2.24.23; i686-pc-mingw32)
Xref csiph.com comp.databases.ms-sqlserver:2161

Show key headers only | View raw


Hello, all

The application I am working with quietly imposes some
limitation on its connection to MSSQL that will not let me
create a temporary table. Below are some of my attempts with
the corresponding results:

  SQL: CREATE TABLE #TEST(a INT)
  ERR: CREATE TABLE is unsupported

  SQL: BEGIN CREATE TABLE #TEST(a INT) END
  RES: No error, but no table is created.

  SQL: SELECT 1 a INTO #TEST
  ERR: Browse mode cannot be used with INSERT,
       SELECT INTO, or UPDATE statements.

On the other hand, that same connection allows anything
within dynamic SQL, but of course it is executed in its own
context and has no effect on the parent context.  What else
can I try to coax it into creating a table, or is there no
chance?

Yes, I know that it smells bad, but sometimes one has to
choose the lesser evil while in reverse-engineering and
fixing poorly maintained legacy software. Originally, it
used a separate connection to create a global temporary
table with a GUID for name, and to pass that name as a
parameter to many user-supplied stored procedures, which had
to be written in dynamic SQL...

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

Back to comp.databases.ms-sqlserver | Previous | NextNext in thread | Find similar


Thread

Creating a table in spite of browse mode Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-10-18 15:09 +0300
  Re: Creating a table in spite of browse mode Erland Sommarskog <esquel@sommarskog.se> - 2022-10-18 20:59 +0200
    Re: Creating a table in spite of browse mode Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-10-19 17:52 +0300
      Re: Creating a table in spite of browse mode Erland Sommarskog <esquel@sommarskog.se> - 2022-10-19 22:43 +0200
        Re: Creating a table in spite of browse mode Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-10-20 12:05 +0300

csiph-web