Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

String size in Excel VBA

I have a string that contains a long SQL structure for retrieving data from SQL Server. Is there a work around solution to have longer string size to contain this long statement ?

Tks
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK
AXISHK

ASKER

Seem like there is a size limitation in string strSQL, correct ?
About 2 billion characters. I seriously doubt you're even close to that limit.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK

ASKER

The SQL statement is coded in a VBA. Any better way to handle this ?

For string size, it is not limited to 255 chars, correct ?

Tks
Coding the string in VBA is fine as long as the lines are not too long (use line continuations or string concatenation).
String size isn't limited to 255 chars.
Avatar of AXISHK

ASKER

Tks