Large String value

wcboyd

Registered User.
Local time
Yesterday, 18:42
Joined
Aug 30, 2004
Messages
50
Hello,

I have a very long SQL statement that I want to assign to a variable, but Access keeps chocking on the length. Is there some way to define the String data type as bigger than 255 characters?

Thanks.
 
Craig,

Access strings can definitely hold more than 255 characters.
Are you needing continuation lines?

Code:
strSQL = "Select FieldA, FieldB, FieldC " & _
         "From   SomeTable" & _
         "Order By FieldA DESC"

hth,
Wayne
 
if its a text type in a table then there is a 255 char limit.

try memo type instead 64K limit, but you can't sort a memo field

its not the form text box thats the problem, its the table probably
 
Same problem with truncation

I am experiencing the same problem.

My VB code is:

Dim InsertStatement As String

InsertStatement = "INSERT INTO tCoverage (CompanyCd, ProvinceCd, " & _
"LOBCd, ProductID, CoverageCd, NBSStartDt, WIPVersion, " & _
"RWLStartDt, ScreenID, WithoutCreditChargeInd, " & _
"GrandfatheredInd, OverrideModeInd, EndorsementTypeCd, " & _
"NoteText, AvailabiltyOfOPCFsTxt, LimitDedTypeCd, LimitDedGroupCd) " & _
"VALUES ('" & Forms!fCoverageDetail!CompanyCd & "', " & _
Forms!fCoverageDetail!ProvinceCd & "', " & _
Forms!fCoverageDetail!LOBCd & "', " & _
Forms!fCoverageDetail!ProductID & "', " & _
Forms!fNewVersionDates!newNBSStartDt & ", 0, " & _
Forms!fNewVersionDates!newRWLStartDt & ", " & _
Forms!fCoverageDetail!ScreenID & ", " & _
Forms!fCoverageDetail!WithoutCreditChargeInd & ", " & _
Forms!fCoverageDetail!GrandfatheredInd & ", " & _
Forms!fCoverageDetail!OverrideModeInd & ", " & _
Forms!fCoverageDetail!EndorsementTypeCd & ", " & _
Forms!fCoverageDetail!NoteText & ", " & _
Forms!fCoverageDetail!AvailabiltyOfOPCFsTxt & ", " & _
Forms!fCoverageDetail!LimitDedTypeCd & ", " & _
Forms!fCoverageDetail!LimitDedGroupCd & ")"

When I look at the InsertStatement in debug, it looks like the following:

"INSERT INTO tCoverage (CompanyCd, ProvinceCd, LOBCd, ProductID, CoverageCd, NBSStartDt, WIPVersion, RWLStartDt, ScreenID, WithoutCreditChargeInd, GrandfatheredInd, OverrideModeInd, EndorsementTypeCd, NoteText, AvailabiltyOfOPCFsTxt, LimitDedTypeCd, Limi"

It is truncated after byte 255.
 
are you working in access - can't you get it into a stored query ,and open it from there?
 

Users who are viewing this thread

Back
Top Bottom