Hi Cesw,
We are running VB 6.0 using ADO to connect to an Oracle backend.
It seems continuations are limited to about 24 lines, so my rather
large query is strung out hundreds of bytes lengthwise.
I'm getting an Oracle -923, from keyword not found where expected
error.
The query runs in Toad when I take out the " " & _ continuation
characters so I think it's ok.
Is there a byte restriction on the length of the ResultSet.open
command, or a line length at which the query may be getting truncated?
When building lengthy SQL statements, I generally do something like the
following:
Dim sSQL As String
sSQL = ""
sSQL = sSQL & " SELECT Field1, Field2"
sSQL = sSQL & " FROM Table"
sSQL = sSQL & " WHERE Field1 200"
Set rs = New ADODB.Recordset
rs.Open sSQL, mConn
Regards
Stephen Bullen
Microsoft MVP - Excel
Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev