相关疑难解决方法(0)

如何在VBA中使用FileSystemObject?

有什么我需要参考的吗?我该如何使用:

Dim fso As New FileSystemObject
Dim fld As Folder
Dim ts As TextStream
Run Code Online (Sandbox Code Playgroud)

我收到错误,因为它无法识别这些对象.

excel vba filesystemobject

105
推荐指数
3
解决办法
33万
查看次数

行集不支持向后滚动

我试图用以下代码查询MySQL数据库:

'declare the variables 
Dim Connection
Dim Recordset
Dim SQL

'declare the SQL statement that will query the database
SQL = "SELECT * FROM CUSIP"

'create an instance of the ADO connection and recordset objects
Set Connection = CreateObject("ADODB.Connection")
Set Recordset = CreateObject("ADODB.Recordset")

'open the connection to the database
Connection.Open "DSN=CCS_DSN;UID=root;PWD=password;Database=CCS"

Recordset.CursorType=adOpenDynamic

'Open the recordset object executing the SQL statement and return records 

Recordset.Open SQL,Connection
Recordset.MoveFirst

If Recordset.Find ("CUSIP_NAME='somevalue'") Then
    MsgBox "Found"
Else
    MsgBox "Not Found"
End If


'close the …
Run Code Online (Sandbox Code Playgroud)

sql vbscript recordset rowset

5
推荐指数
1
解决办法
8398
查看次数

标签 统计

excel ×1

filesystemobject ×1

recordset ×1

rowset ×1

sql ×1

vba ×1

vbscript ×1