Topic: EXCEL Function returning RecordSet
The code f-tsii which should return a dial-up is more low presented
Function F_Exec_SQL_ToRcdSet (ConString As String, CommandText As String) As ADODB.Recordset ' Procedure fulfills SQL the request which result returns as Recordset ' ConString - a line of connection ' CommandText - the request text Dim Cmd As ADODB.Command Dim Con As Connection Set Con = New ADODB.Connection Con. CommandTimeout = 1000000 Con. ConnectionString = ConString Con. CursorLocation = adUseClient Con. Open Set Cmd = CreateObject ("ADODB.Command") Cmd. CommandTimeout = 1000000 Cmd. CommandType = adCmdText Cmd. ActiveConnection = Con Set Exec_SQL_ToRcdSet = Con. Execute (CommandText) End Function
By a call of this function it returns nothing.
I assume that at an output from F_Exec_SQL_ToRcdSet the cursor is closed.
Whether truly my assumption?
How it is possible to return a dial-up?