TAILIEUCHUNG - sams teach Yourself windows Script Host in 21 Days phần 9

Các đối tượng Command đại diện cho một câu lệnh SQL, tên một bảng, hoặc một thủ tục lưu trữ. Bạn có thể sử dụng nó như là một cách thuận tiện để gọi một thủ tục lưu trữ mà bạn có thể sử dụng nhiều lần, nó có phương pháp và tài sản cho phép bạn để mô tả các đặc điểm của các thủ tục lưu trữ. | Simpo PDFuMerge ancFSplit Unregistered Version - http Elself sUserName Then Displaying information for _ computer sComputerName Else Displaying information for _ user sUserName on computer sComputerName End If 3. Generate SQL statement that will be used to retrieve user login details sSQL SELECT UserName Computer Time _ FROM Users UserLogins _ WHERE If sComputerName Then sSQL sSQL _ AND sComputerName End If If sUserName Then sSQL sSQL _ AND sUserName End If 4. Set parameters for database connection sDriver SQL Server sServer TLFSRV1 sUser sa sPassword sDatabase wsh Create connection string sConnect driver sDriver server sServer uid _ sUser pwd sPassword database sDatabase Simpo PDF Merge and Split Unregistered Version - http Now attempt to connect to the database Set connDb sConnect If 0 Then ShowErr Unable to connect to database. End If 5. Create a recordset using the SQL command that we defined above Set rsetLogs sSQL connDb adOpenForwardOnly _ adLockReadOnly adCmdText If 0 Then ShowErr Error running logs query End If 6. Now we iterate through the results and dump them to the screen Do While Not rsetLogs UserName _ rsetLogs Computer _ rsetLogs Time Loop 7. cQuit with no error 0 SUBR ShowErr sDesc DESC Displays information about the current error then quits. Sub ShowErr sDesc Error sDesc Err - End Sub Simpo PDF Merge and Split Unregistered Version - http SUBR ShowUsage DESC Displays usage details for this script. Sub ShowUsage USAGE viewlogs -c computer -u username

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.