string length limitation? 
Author Message
 string length limitation?

Am trying to store a 300 line SQL statement in a string variable (jest a
test) and send to Oracle via OLE DB and MSDAORA,  every time I set the
value of my striong variable it truncates to 253 charcters.  Strange
behavior, I would say.

Am using MDAC 2.5, tried ADO 2.0 & ADO 2.1, VB6, win95, blah, blah

Any suggestion greatly appreciated...

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 string length limitation?

Are you viewing the contents of the string in the Immediate window?
If so that is your problem. The immediate window will truncate the
string for display.  All of your string is there it is just not
visible in the immediate window.

Quote:

>Am trying to store a 300 line SQL statement in a string variable (jest a
>test) and send to Oracle via OLE DB and MSDAORA,  every time I set the
>value of my striong variable it truncates to 253 charcters.  Strange
>behavior, I would say.

>Am using MDAC 2.5, tried ADO 2.0 & ADO 2.1, VB6, win95, blah, blah

>Any suggestion greatly appreciated...

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 string length limitation?
Strings do have limited lenghts, depending on how you declare them, but I
doubt any of them limit you to <300 characters!!!


Thu, 06 Feb 2003 09:51:48 GMT  
 string length limitation?
strings can hold up much more than 300 characters.....but there is a
limit....you might have to use an array of bytes
Quote:

> Am trying to store a 300 line SQL statement in a string variable (jest a
> test) and send to Oracle via OLE DB and MSDAORA,  every time I set the
> value of my striong variable it truncates to 253 charcters.  Strange
> behavior, I would say.

> Am using MDAC 2.5, tried ADO 2.0 & ADO 2.1, VB6, win95, blah, blah

> Any suggestion greatly appreciated...

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 string length limitation?
Sounds like a problem saving the 300 LINE SQL statement to the string.
Are you saying that you can only save 253 CHARACTERS or 253 LINES of
text in the variable?

If you are only passing a subset of the SQL, then changing the ADO
verison, etc does not seem to be the place to be focusing your
debugging efforts.

Can you give an example of code how you are storing the 300 lines into
the variable?



Quote:
>strings can hold up much more than 300 characters.....but there is a
>limit....you might have to use an array of bytes

>> Am trying to store a 300 line SQL statement in a string variable (jest a
>> test) and send to Oracle via OLE DB and MSDAORA,  every time I set the
>> value of my striong variable it truncates to 253 charcters.  Strange
>> behavior, I would say.

>> Am using MDAC 2.5, tried ADO 2.0 & ADO 2.1, VB6, win95, blah, blah

>> Any suggestion greatly appreciated...

>> Sent via Deja.com http://www.deja.com/
>> Before you buy.



Fri, 07 Feb 2003 10:06:49 GMT  
 string length limitation?
Does the SQL code work in Oracle?

Jonathan Allen

Quote:

> Am trying to store a 300 line SQL statement in a string variable (jest a
> test) and send to Oracle via OLE DB and MSDAORA,  every time I set the
> value of my striong variable it truncates to 253 charcters.  Strange
> behavior, I would say.

> Am using MDAC 2.5, tried ADO 2.0 & ADO 2.1, VB6, win95, blah, blah

> Any suggestion greatly appreciated...

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 string length limitation?


Quote:

> Are you viewing the contents of the string in the Immediate window?
> If so that is your problem. The immediate window will truncate the
> string for display.  All of your string is there it is just not
> visible in the immediate window.

Aha!  this is my problem... I was receiving an error "SQL statement not
properly ended" and set a watch on the variable, and the watch window
does in fact show only 253 characters.

I still have the SQL err, but unrelated to the string length issue..

Thanks!

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 string length limitation?
Hi,

Well what I would do (if the problem is not obvious) is to write your
SQL String (if it is stored in strSQL) to a plain old Text file as in:

open "C:\Temp\MySQLFile.txt" for output as #1
print #1, sqlstr
close #1

Then use notepad to open this file, copy the text from here and paste it
into whatever SQL Suery Tool Oracle Provides (Sorry I am a SQL Server
guy, and here it would be the Query Analyzer)

Anyway, run this query, and maybe it will give you more useful
infomration about which line the offending code is on. (Sounds like
something as simple as errant ";" or comma or something)

HTH

--
-Dick Christoph

http://www1.minn.net/~dchristo

Quote:


> > Are you viewing the contents of the string in the Immediate window?
> > If so that is your problem. The immediate window will truncate the
> > string for display.  All of your string is there it is just not
> > visible in the immediate window.

> Aha!  this is my problem... I was receiving an error "SQL statement not
> properly ended" and set a watch on the variable, and the watch window
> does in fact show only 253 characters.

> I still have the SQL err, but unrelated to the string length issue..

> Thanks!

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. String length limitation?

2. String Length Limitation Workaround?

3. Limitation on HTTP string length?

4. ADOX: Extending a fixed length Jet string field length

5. .FormFields and text length limitation?

6. URL Length Limitation

7. Passing fixed length string to API and is returning nulls in string

8. String limitations

9. 64K string limitation

10. 64K string limitation problem

11. 32k String & Text Box Limitation

12. HELP 64K String limitation

 

 
Powered by phpBB® Forum Software