Vb .NET和MySql连接没有关闭......为什么?

编程入门 行业动态 更新时间:2024-10-17 07:33:04
本文介绍了Vb .NET和MySql连接没有关闭......为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个大问题,我不知道如何解决它:

在 shared< g class =" gr_ gr_19 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep"数据-GR-ID =" 19 QUOT; ID = QUOT 19 QUOT;>窗户< / g取代;网络托管有很多< g class =" gr_ gr_24 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace"数据-GR-ID =" 24英寸; ID = QUOT; 24英寸;> ASP< / g取代;和< g class =" gr_ gr_23 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling"数据-GR-ID =" 23" id =" 23"> aspx< / g>访问MySql的页面(包括VB .NET,都是VBScript),我找不到我没有关闭数据库连接的地方。 这会导致大量的同步幻像达到服务器强加的连接限制的连接会阻止我对数据库的访问。 :( $ 如果找到写得不好的代码怎么办?感谢所有人回复我。

解决方案

首先请清理你的帖子,因为它几乎不可能阅读。我能读到的是你在一个应用程序中有一个或有多个连接。这是非常不明智的,您需要在需要时创建连接,使用它,关闭它。

您需要做的是重新考虑如何进行连接。

I have a big problem and I do not know how to solve it:

In a shared <g class="gr_ gr_19 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="19" id="19">windows</g> web hostingwith a lot of <g class="gr_ gr_24 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="24" id="24">asp</g> and <g class="gr_ gr_23 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="23" id="23">aspx</g> pages accessing MySql (both VB .NET, both VBScript) and I cannot find where I do not close the connection to the database. This causes a lot of simultaneous phantoms connections that, reaching the connections limit imposed by the server, block my access to the database. :( What can I do to find the badly written code? Thanks to all will reply to me.

解决方案

First off please clean up your post as it's nearly impossible to read. What I could read is you have a single or have multiple connections in a app. This is very unwise, you need to create the connection when needed, use it, close it.

What you need to do is rethink how you are doing connections.

更多推荐

Vb .NET和MySql连接没有关闭......为什么?

本文发布于:2023-10-27 10:57:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533169.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Vb   NET   MySql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!