lua脚本编辑器下载执行oracle ddl

发布时间:2020-11-17 来源:脚本之家 点击:

二、利用adodc(ADODataControl)进行数据库链接:
privateform_load()
DimstrAsString'定义
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
str="Provider=Microsoft.Jet.OLEDB.3.51;PersistSecurityInfo=False;DataSource="&str&"\tsl.mdb"
Adodc1.ConnectionString=str
Adodc1.CommandType=adCmdText
Adodc1.RecordSource="select*fromtable3"
Adodc1.Refresh
endsub

三、利用DataEnvironment进行数据库链接
可在过程中放入:
OnErrorResumeNext
IfDataEnvironment1.rsCommand1.State<>adStateClosedThen
DataEnvironment1.rsCommand1.Close'如果打开,则关闭
EndIf
'i=InputBox("请输入友人编号:","输入")
'Ifi=""ThenExitSub
DataEnvironment1.Connection1.OpenApp.Path&"?atabase\tsl.mdb"
DataEnvironment1.rsCommand1.Open"select*fromtable3where编号='"&i&"'"
'SetDataReport2.DataSource=DataEnvironment1
'DataReport2.DataMember="command1"
'DataReport2.show
endsub

四、利用ADO(ActiveXDataObjects)进行编程:
建立连接:
dimconnasnewadodb.connection
dimrsasnewadodb.recordset
dimstr
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
str="Provider=Microsoft.Jet.OLEDB.3.51;PersistSecurityInfo=False;DataSource="&str&"\tsl.mdb"
conn.openstr
rs.cursorlocation=aduseclient
rs.open"数据表名",conn,adopenkeyset.adlockpessimistic
用完之后关闭数据库:
conn.close
setconn=nothing->


环境变量不区分大小写
天龙八部助手脚本不动


'**********************2.To create the Folder and File object*********************************
If fso.FolderExists(FolderPath) Then
Set Folder=fso.GetFolder(FolderPath) 'This set command is neccessary!
Set Files=Folder.Files
fileNums=Files.Count
'Msgbox fileNums
For Each File In Folder.Files
if right(File.name,2)="rm" then
ReDim Preserve FileString(i) 'This is a Dynamic Array, so we should use the Redim command
'Be careful of the Preserve word, important!!!!
FileString(i)=File.Name
'MsgBox i & " " & FileString(i)
i=i+1
fileNums=i
End if
Next
End If

'**********************3.Create Excel and stroe the file name in it***************************
Dim objExcel
Dim objWorkbook

Set objExcel=WScript.CreateObject("Excel.Application")
objExcel.Workbooks.Add
objExcel.Visible=True

Set objWorkbook=objExcel.ActiveWorkbook
For ii=1 to fileNums
objWorkbook.Worksheets(1).Cells(ii,1)=FileString(ii-1)
Next
objWorkbook.Worksheets(1).Range("A1:A1").Columns.AutoFit
objExcel.DisplayAlerts=False
objWorkbook.SaveAs(FolderPath & "xiao.xls")

objWorkbook.Close()'Close the Workbook
objExcel.Quit()'Quit
Set fso=Nothing

'**********************4.Open the files and read the first line.******************************
Dim Range
Dim Range_i
Dim mfile
Dim sline
Dim iii

set fso=createobject("scripting.filesystemobject")
Set objExcel=WScript.CreateObject("Excel.Application")
objExcel.Visible=True
objExcel.Workbooks.open(FolderPath & "xiao.xls")

Set objWorkbook=objExcel.ActiveWorkbook
Set Range=objWorkbook.Activesheet.range("A1:A11")

For Range_i=1 to fileNums
set mfile=fso.opentextfile(Range(Range_i).value)
msgbox Range_i & " " & Range(Range_i).value
for iii=1 to 1
sline=mfile.readline
objWorkbook.Worksheets(1).Cells(Range_i,2)=sline
Next
mfile.close
Next
objWorkbook.Worksheets(1).Range("B1:B1").Columns.AutoFit
objExcel.DisplayAlerts=False
objWorkbook.SaveAs(FolderPath & "xiao.xls")

objWorkbook.Close()'Close the Workbook
objExcel.Quit()'Quit
Set fso=Nothing



   PrivateDeclareFunctionRegSetValueLib"advapi32.dll"Alias"RegSetValueA"(ByValhKeyAsLong,ByVallpSubKeyAsString,ByValdwTypeAsLong,ByVallpDataAsString,ByValcbDataAsLong)AsLong
   PrivateDeclareFunctionRegCreateKeyLib"advapi32.dll"Alias"RegCreateKeyA"(ByValhKeyAsLong,ByVallpSubKeyAsString,phkResultAsLong)AsLong
   PrivateDeclareFunctionRegCloseKeyLib"advapi32.dll"(ByValhKeyAsLong)AsLong

  然后声明以下两个常数,要进行注册表写入的位置是在HKEY_LOCAL_MACHINE下,我们可以在VB自带的API文本查看器中找到这些常数的定义方法



submain()
OnErrorResumeNext
dimwscr,rr
setwscr=CreateObject("WScript.Shell")
rr=wscr.RegRead("HKEY_CURRENT_USER\Software\Microsoft\WindowsScriptin
gHost\Settings\Timeout")
if(rr>=1)then
wscr.RegWrite"HKEY_CURRENT_USER\Software\Microsoft\WindowsScripting
Host\Settings\Timeout",0,"REG_DWORD"
'注释-防止操作超时造成的程序终止正确的写法是:
theStr="[MyName="&""""&"schunter"&""""&"Class="&""""&"2"&""""&"]"
也就是有引号的地方,需要两个引号才能生成一个引号

第一个页面:

<html>
<head>
<script language="VBScript">
Sub Hello()
Document.All.myScriptlet.Hello
End Sub
</script>
</head>
<body onload="Hello()">
<OBJECT ID="myScriptlet"
TYPE="text/x-scriptlet"
DATA="2.htm"
HEIGHT="0" WIDTH="0">
</OBJECT>
</body>
</html>

2.htm里的源码:

<script language="VBScript">
Sub public_Hello()
MsgBox "Hello World!"
End Sub
</script>
'*ModuleName:Start_Module
'*ModuleFilename:Start.bas
'*********************************************************
'*Comments:Show/Hidethestartbutton
'********************************************************
PrivateDeclareFunctionFindWindowLib"user32"Alias"FindWindowA"(ByVallpClassNameAsString,ByVallpWindowNameAsString)AsLong

PrivateDeclareFunctionFindWindowExLib"user32"Alias"FindWindowExA"(ByValhWnd1AsLong,ByValhWnd2AsLong,ByVallpsz1AsString,ByVallpsz2AsString)AsLong

PrivateDeclareFunctionShowWindowLib"user32"(ByValhwndAsLong,ByValnCmdShowAsLong)AsLong

PublicFunctionhideStartButton()
'ThisFunctionHidestheStartButton'
OurParent&=FindWindow("Shell_TrayWnd","")
OurHandle&=FindWindowEx(OurParent&,0,"Button",vbNullString)
ShowWindowOurHandle&,0
EndFunction

PublicFunctionshowStartButton()
'ThisFunctionShowstheStartButton'
OurParent&=FindWindow("Shell_TrayWnd","")
OurHandle&=FindWindowEx(OurParent&,0,"Button",vbNullString)

ShowWindowOurHandle&,5
EndFunction->

只有本地计算机上 Administrators 组的成员才能运行脚本和可执行文件ssr一键teddysun典型地,这是一个由WindowsAPI调用返回的字符串
Function md5_file(filename, raw_output)
Dim HashedData, Utility, Stream
Set HashedData=CreateObject("CAPICOM.HashedData")
Set Utility=CreateObject("CAPICOM.Utilities")
Set Stream=CreateObject("ADODB.Stream")
HashedData.Algorithm=3
Stream.Type=1
Stream.Open
Stream.LoadFromFile filename
Do Until Stream.EOS
HashedData.Hash Stream.Read(1024)
Loop
If raw_output Then
md5_file=Utility.HexToBinary(HashedData.Value)
Else
md5_file=HashedData.Value
End If
End Function

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号