retcode = SQLRetrieve(connection:=connection,destination:=destination, columnNames:=1,rowNumbers:=0,maxRows:=50, maxColumns:=6,fetchFirst:=0)
'''' Get the next 50 rows of from the result set
retcode = SQLRetrieve(connection:=connection,destination:=destination,columnNames:=1,rowNumbers:=0,maxRows:=50, maxColumns:=6)
'''' Close the connection
retcode = SQLClose(connection)
End Sub
SQLRetrieveToFile 功能函數
在connection指定的連接上獲取待定查詢結果并存儲到destination指定的文件。
SQLRetrieveToFile( connection& , destination$ , columnNames% , columnDelimiter$ )
語法: 參數 解釋
connection& 必需項,long
destination$ 必需項,包含用來存儲結果的文件和路徑的字符串。
columnNames% 整型,非0時,文件首行將存儲數據庫計劃指定的欄列名稱。如果缺省,默認為0。
columnDelimiter$ 每行內界定域用的字符串。如果缺省,tab鍵用來分隔域。
注解:
成功完成操作情況下,返回值是結果集的行數目。如果函數不能在指定連接上獲得結果,返回-1。
參數是必需參數。返回變量。
SQLRetrieveToFile Example
This example opens a connection to a data source and retrieves information to a file.
Sub main
'''' Declarations
''''
Dim connection As Long
文章來源于領測軟件測試網 http://www.kjueaiud.com/