Coba ini harus menambahkan setiap bidang dalam recordset ke string input. Jika Anda hanya menginginkan nilai tertentu dari setiap catatan, Anda dapat melakukan ini
input = input & rs.Fields.Item("FIeld_Name")
Alih-alih mengulang setiap bidang.
connectionString = "DRIVER={Microsoft ODBC for Oracle};SERVER=oracle_server;User Id=user;Password=password;"
Set connection = CreateObject("ADODB.Connection")
connection.Open connectionString
Set rs = connection.Execute("select * from dual")
input = ""
Do Until rs.EOF
for i = 0 To rs.Fields.Count - 1
input = input & rs.Fields.Item(i) & "|"
Next
input = input & VBNewLine
rs.MoveNext
Loop
MsgBox input
Set connection = Nothing
Set rs = Nothing