VBS
LuckyDragonM
自动化行业 数据库 vbs vb java C#
展开
-
内容输出到文本文档
Dim fso, MyFileSet fso = CreateObject("Scripting.FileSystemObject")Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)MyFile.WriteLine("This is a test.")MyFile.Close原创 2020-03-27 13:58:04 · 272 阅读 · 0 评论 -
关于VB6.0的Microsoft windows common control 6.0 对象库未注册问题
题,关于这个问题,我在网上找了好多方案,但都不管用。下面为脚本方法(win32位系统与win64位系统需进入不同的文件夹下,执行下面的脚本)32位系统cd C:\Windows\System3264位系统cd C:\Windows\SysWOW64regsvr32 MSCOMCTL.OCXregtlib msdatsrc.tlb需要注意的是,regtlib.exe这个文件,s...转载 2019-11-18 14:46:41 · 2890 阅读 · 0 评论 -
VBS弹出选择打印机对话框
On Error Resume Next'Dim ShowPrinter'Set ShowPrinter = ScreenItems("mcdC") 'MicrosoftCommonDialogControl 6.0控件'ShowPrinter.PrinterDefault = True'ShowPrinter.CancelError = True'ShowPrinter.Sh...原创 2019-11-18 14:44:30 · 1290 阅读 · 0 评论 -
vbs 持续写入数据到文件
'完成后写入日志Dim FileName, FileLogDim fs, fsoFileName = CreateObject("Scripting.FileSystemObject").GetFolder(".").Path & "\FileLog.txt"FileLog = Now() & ": " &",异常信息:" & Err.Descriptio...原创 2019-05-23 12:45:22 · 1604 阅读 · 0 评论 -
VBS 调用web接口
Dim objHTTP,xmlDOC,strWebserviceURL,strRequest,bOK,xmlStrSet objHTTP = CreateObject("MSXML2.XMLHTTP")'Set xmlDOC =CreateObject("MSXML.DOMDocument")'解析XMLstrWebserviceURL = "http://192.168.1.101:80/...原创 2019-04-30 15:48:39 · 1515 阅读 · 0 评论 -
VBS分离数据库文件(WinCC)
'查询语句Dim strSQL'结果集行数Dim RsCountSet objConnection = CreateObject("ADODB.Connection")'wincc运行数据库strConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Dat...原创 2018-11-10 16:15:01 · 437 阅读 · 0 评论 -
VBS 动态数组
'动态数组Redim Preserve sqlAry(0)sqlAry(0)="EXEC sp_detach_db [SERVER1_OS(1)_ALG_201810090000_201810151739]"Redim Preserve sqlAry(1)sqlAry(1)="EXEC sp_detach_db [SERVER1_OS(1)_ALG_201810160000_2018102...原创 2018-11-10 16:08:52 · 1303 阅读 · 0 评论 -
VBS 连接异地MS SQL 数据库
启用TCP/IPOn Error Resume Next'连接对象Dim oCon'数据库连接字符串Dim strCon'结果集对象Dim oRs'执行对象Dim oCmd'查询语句Dim strSQL'结果集行数Dim RsCount,IP,Port,PWD,usr,DBNameSet oCon = CreateObject("ADODB.Connection")...原创 2018-06-03 16:05:51 · 1042 阅读 · 0 评论 -
vbs 创建并输出文本
Dim fso, MyFile Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.CreateTextFile("c:\testfile.txt", True) MyFile.WriteLine("This is a test.") MyFile.Close原创 2018-04-24 13:05:59 · 6588 阅读 · 0 评论 -
VBS、VB 提示框用法
DescriptionDisplays a message in a dialog box, waits for the user to click a button, and returns a value indicating which button the user clicked.SyntaxMsgBox(prompt[, buttons][, title][, helpfile, co...原创 2018-04-24 13:05:02 · 5079 阅读 · 0 评论 -
vb文本输入框
DescriptionDisplays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box.SyntaxInputBox(prompt[, title][, default][, xpos][, ypos][, h...原创 2018-04-24 13:03:27 · 1499 阅读 · 0 评论