![]() |
Size Limit for ADO query?
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 rathe large query is strung out hundreds of bytes lengthwise. I'm getting an Oracle -923, from keyword not found where expecte error. The query runs in Toad when I take out the " " & _ continuatio characters so I think it's ok. Is there a byte restriction on the length of the ResultSet.ope command, or a line length at which the query may be getting truncated? Th -- ces ----------------------------------------------------------------------- cesw's Profile: http://www.excelforum.com/member.php...fo&userid=2711 View this thread: http://www.excelforum.com/showthread.php?threadid=46675 |
Size Limit for ADO query?
Well - I figured out what was wrong... missing a space at the end so i looked like 'last_col_to_selectfrom tbl1' I'm still curious if there are any editing limitations, or size fo queries, etc... Also, is there another way to continue lines besides _ that will allo for 25? Th -- ces ----------------------------------------------------------------------- cesw's Profile: http://www.excelforum.com/member.php...fo&userid=2711 View this thread: http://www.excelforum.com/showthread.php?threadid=46675 |
Size Limit for ADO query?
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 |
Size Limit for ADO query?
Size limit for a single SQL statment in Oracle is quite large - either 32
or 64 k I think. There's no limit on using _ as far as I know. You could always store the query in a file and use replace() to substitute parameter values for placeholder text. Tim -- Tim Williams Palo Alto, CA "cesw" wrote in message ... 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? Thx -- cesw ------------------------------------------------------------------------ cesw's Profile: http://www.excelforum.com/member.php...o&userid=27117 View this thread: http://www.excelforum.com/showthread...hreadid=466758 |
All times are GMT +1. The time now is 09:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com