MySQL检查数据库是否存在(MySQL Check if a database exists)
我正在尝试确定某个名称的数据库是否存在,如果不存在则创建它。 理想情况下,这将在VBScript中。 我目前正在尝试使用数组的循环搜索,但数据库的总数将发生很大变化。
set dbQuery = ConnSQL.execute(checkDBsql) if dbQuery.BOF and dbQuery.EOF then ' Query didn't return any records. ConnSQL.execute(MakeDb) else dbQuery.MoveFirst i = 0 Do While Not dbQuery.EOF i = i + 1 loop end if set dbQuery = ConnSQL.execute(checkDBsql) if dbQuery.BOF and dbQuery.EOF then ' Query didn't return any records. msgBox "ERROR!" else e = 0 do while not dbQuery.EOF DBName(e) = dbQuery("Database") e = e + 1 loop For a = 1 to UBound(DBName) If DBName(a) = OldDBName Then MsgBox DBName(a) end if Next connSQL.close
I'm trying to determine if a database of a certain name exists and then create it if it does not. Ideally this would be in VBScript. I currently am trying using a loop search of an array but the total number of databases will change greatly.
set dbQuery = ConnSQL.execute(checkDBsql) if dbQuery.BOF and dbQuery.EOF then ' Query didn't return any records. ConnSQL.execute(MakeDb) else dbQuery.MoveFirst i = 0 Do While Not dbQuery.EOF i = i + 1 loop end if set dbQuery = ConnSQL.execute(checkDBsql) if dbQuery.BOF and dbQuery.EOF then ' Query didn't return any records. msgBox "ERROR!" else e = 0 do while not dbQuery.EOF DBName(e) = dbQuery("Database") e = e + 1 loop For a = 1 to UBound(DBName) If DBName(a) = OldDBName Then MsgBox DBName(a) end if Next connSQL.close
原文:https://stackoverflow.com/questions/3672423
更新时间:2021-10-20 10:10
最满意答案
我敢打赌它是html()函数。 我会尝试提醒数据以确保ajax函数正常工作,然后尝试使用不同的方法将数据添加到表中。
I bet it's the html() function. I'd try alerting the data to make sure the ajax functions are working, then try using a different way to add the data to your table.
相关问答
更多-
我找出了这个问题。 我曾经使用过android:launchMode="singleTop" ,它阻止我的应用程序在我的收件人Activity的onNewIntent()上接收oAuth标记。 但是这种情况只发生在我尝试使用Chrome以外的浏览器连接到Fitbit时。 最后,我将launchMode更改为android:launchMode="singleTask" 有关更多详细信息,请访问https://stackoverflow.com/a/36942185/3627429回答。 I figured ...
-
我发现了波纹管解决方案。它工作正常。 myGrid.entBox.onselectstart = function(){return true; }; I have found the bellow solution.It's working fine. myGrid.entBox.onselectstart = function(){ return true; };
-
firefox绝对定位的工作方式与所有浏览器不同(firefox absolute positioning working differently than all browser)[2023-11-04]
设置#caption以display:inline-block 演示 - http://jsfiddle.net/Lkb4ncgb/ body{ background: red; margin: 120px 0; } #caption { font-size: 36px; position: relative; display:inline-block; } .captions { margin-left: 100px; } .bo ... -
我敢打赌它是html()函数。 我会尝试提醒数据以确保ajax函数正常工作,然后尝试使用不同的方法将数据添加到表中。 I bet it's the html() function. I'd try alerting the data to make sure the ajax functions are working, then try using a different way to add the data to your table.
-
第一次改变 至: 然后使用以下javascript: //when login button is clicked (function(){ $('#btn_login').on('click' , function(){ //alert('about t ...
-
我相信你的问题是CSS中的语法错误: @font-face { font-family: webfont; src: url(thinnyness.ttf); src: local('Delicious'), local(Delicious'), url(thinnyness.ttf) format('truetype'); } 你错过了第二个local(Delicious')声明中的主要撇号。 这导致整个样式表中断,阻止定位工作。 I believe your probl ...
-
最后我找到了解决方案。 我使用了一个插件GreaseMonkey 。 它允许我将我的js代码插入到iframe中,因此我可以使用消息API与我的页面中的代码进行交互。 例子: 防止在父窗口中运行代码: if (window.top == window.self) return; 从主窗口接收一些东西: window.addEventListener('message', yourHandlerHere, false); 向主窗口发布内容: window.parent.postMessage(yourData ...
-
getElementByID要求HTML元素具有ID,只是名称不够好。 getElementByID requires the HTML element to have an ID, just a name isn't good enough. ...
-
很简单。 当我在浏览器中打开网页时,我只在地址栏中输入“server”而不是“server.sldn.com”,并让默认的DNS后缀找到它。 因此,为了避免使用jquery.ajax时遇到的特定版本的痛苦,请确保您的浏览器具有FQDN,否则它在跨源资源共享(CORS)方面存在问题。 您可能希望将您的网站重定向到FQDN或类似的东西。 Simple enough. When I opened the web page in a browser, I typed just "server" instead of ...
-
好的抱歉,我修复了,它是filter:blur('#svgBlur'); filter:url('#svgBlur'); Ok sorry i fixed, it was filter:blur('#svgBlur'); to filter:url('#svgBlur');