R
RB Smissaert
Is it possible to the header fields when running SQL on sheet ranges?
The connection is like this:
strSheetConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ActiveWorkbook.FullName & ";" & _
"Extended Properties=Excel 8.0;"
Set rs = New ADODB.Recordset
rs.Open Source:=strQuery, _
ActiveConnection:=strSheetConn, _
CursorType:=adOpenForwardOnly, _
LockType:=adLockReadOnly, _
Options:=adCmdText
Tried all sorts of constructions, but nil worked sofar.
Also, would it be possible to run SQL on sheet ranges without saving the
workbook first?
I suppose not as SQL always runs on disk (files) structures rather than data
in memory.
RBS
The connection is like this:
strSheetConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ActiveWorkbook.FullName & ";" & _
"Extended Properties=Excel 8.0;"
Set rs = New ADODB.Recordset
rs.Open Source:=strQuery, _
ActiveConnection:=strSheetConn, _
CursorType:=adOpenForwardOnly, _
LockType:=adLockReadOnly, _
Options:=adCmdText
Tried all sorts of constructions, but nil worked sofar.
Also, would it be possible to run SQL on sheet ranges without saving the
workbook first?
I suppose not as SQL always runs on disk (files) structures rather than data
in memory.
RBS