recordset

S

smk23

I am getting some weird behavior in trying to pull a complex recordset via
ADODB.
I get an error message "to many line continuations" and the recordset is not
pulling all the requested columns.

The SQL statement works fine in Query Analyzer.

Am I hitting some MS Access limitations? I've got about 20 lines in the
query and only around 25 columns. There are nested SQL statements within the
query. As long as the SQL syntax is correct, I don't see why Access would
care since it happens at the DB level.
 
D

Dirk Goldgar

smk23 said:
I am getting some weird behavior in trying to pull a complex
recordset via ADODB.
I get an error message "to many line continuations" and the recordset
is not pulling all the requested columns.

The SQL statement works fine in Query Analyzer.

Am I hitting some MS Access limitations? I've got about 20 lines in
the query and only around 25 columns. There are nested SQL statements
within the query. As long as the SQL syntax is correct, I don't see
why Access would care since it happens at the DB level.

The message about "too many line continuations" sounds like a VBA error
message, not a Jet message or Access message as such. There is a limit
to the number of line continuations you can have in any VBA statement.
If you're building your SQL statement in code with multiple line
continuations, try doing it incrementally, as in this example:

Dim strSQL As String

strSQL = "first line of my SQL statement "
strSQL = strSQL & "second line of my SQL statement "
strSQL = strSQL & "third line of my SQL statement "
strSQL = strSQL & "last line of my SQL statement"


If that doesn't clear things up, feel free to post your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top