Giter VIP home page Giter VIP logo

Comments (8)

RocherKong avatar RocherKong commented on September 3, 2024

declare @NAMEs table ([name] nvarchar(30))
insert into @NAMEs values
(@T_For__tags_0)
,
(@T_For__tags_1).......

这段Sql能执行成功吗?每句Sql后面加上分号试试。

from smartsql.

siegrainwong avatar siegrainwong commented on September 3, 2024

假设完整的业务链是这样的:插入文章-> 插入Tags 跟 Categories -> 完成。

然后根据你的提示我做了以下尝试:

  1. 插入文章 -> 插入Tags -> 成功
  2. 插入文章 -> 插入Categories -> 成功
    (到这里说明SQL应该是没有问题的。)
  3. 插入文章 -> 插入 Tags 和 Categories -> 失败,提示:The connection does not support MultipleActiveResultSets
  4. 加入分号再执行第 3 步,结果同 3
  5. 把第 4 步日志中的带参 SQL 拼接好到查询窗口执行 -> 成功

还有没有可以尝试的方法呢?

from smartsql.

Ahoo-Wang avatar Ahoo-Wang commented on September 3, 2024

@Seanwong933 连接字符串增加 MultipleActiveResultSets=true

from smartsql.

RocherKong avatar RocherKong commented on September 3, 2024

异步方法前面统一带上await

from smartsql.

siegrainwong avatar siegrainwong commented on September 3, 2024

谢谢帮助,才知道MultipleActiveResultSets是连接字符串的东西。

from smartsql.

Ahoo-Wang avatar Ahoo-Wang commented on September 3, 2024

@Seanwong933 方便的话可以提供一下 #13

from smartsql.

siegrainwong avatar siegrainwong commented on September 3, 2024

@Ahoo-Wang 我是个人开源项目使用的,可能不符合你们的条件,如果可以的话我在开发完毕后再评论上去。

from smartsql.

Ahoo-Wang avatar Ahoo-Wang commented on September 3, 2024

@Ahoo-Wang 我是个人开源项目使用的,可能不符合你们的条件,如果可以的话我在开发完毕后再评论上去。

OK,感谢。

from smartsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.