Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


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

Creating a table in spite of browse mode

Started byAnton Shepelev <anton.txt@g{oogle}mail.com>
First post2022-10-18 15:09 +0300
Last post2022-10-20 12:05 +0300
Articles 5 — 2 participants

Back to article view | Back to comp.databases.ms-sqlserver


Contents

  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

#2161 — Creating a table in spite of browse mode

FromAnton Shepelev <anton.txt@g{oogle}mail.com>
Date2022-10-18 15:09 +0300
SubjectCreating a table in spite of browse mode
Message-ID<20221018150920.2c192912e8cb7da6002b965f@g{oogle}mail.com>
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

[toc] | [next] | [standalone]


#2162

FromErland Sommarskog <esquel@sommarskog.se>
Date2022-10-18 20:59 +0200
Message-ID<XnsAF34D5961846BYazorman@127.0.0.1>
In reply to#2161
Anton Shepelev (anton.txt@g{oogle}mail.com) writes:
> 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

Is that the exact error message?
 
>   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.
> 

So what old and ugly client API is this?

[toc] | [prev] | [next] | [standalone]


#2163

FromAnton Shepelev <anton.txt@g{oogle}mail.com>
Date2022-10-19 17:52 +0300
Message-ID<20221019175214.31c258599cdef0751e765686@g{oogle}mail.com>
In reply to#2162
Erland Sommarskog to Anton Shepelev:

> > SQL: CREATE TABLE #TEST(a INT)
> > ERR: CREATE TABLE is unsupported
>
> Is that the exact error message?

Yes.

> > 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.
>
> So what old and ugly client API is this?

Innovating and leading ERP software SAP Business One :-)

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

[toc] | [prev] | [next] | [standalone]


#2164

FromErland Sommarskog <esquel@sommarskog.se>
Date2022-10-19 22:43 +0200
Message-ID<XnsAF35E7270A237Yazorman@127.0.0.1>
In reply to#2163
Anton Shepelev (anton.txt@g{oogle}mail.com) writes:
> Innovating and leading ERP software SAP Business One :-)
> 

That may not be in scope for this newsgroup, I'm afraid. Better find a forum 
for SAP.

[toc] | [prev] | [next] | [standalone]


#2165

FromAnton Shepelev <anton.txt@g{oogle}mail.com>
Date2022-10-20 12:05 +0300
Message-ID<20221020120546.31dafc2dd3fb49c26519a664@g{oogle}mail.com>
In reply to#2164
Erland Sommarskog:

> That may not be in scope for this newsgroup, I'm afraid.
> Better find a forum for SAP.

Their support and forums are hopeless, especially with
regard to such questions.  It took them two years to add the
mandatory Date: field to e-mails sent with their SMTP client
:-) I was asking here for some cunning, unusual, hackery,
and perverted ways to create tables in SQL, which I could
try to bypass the limitation in SAP software.

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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.databases.ms-sqlserver


csiph-web