B4J Question Clipboard Size B4J for Copy Past

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi all,
Is there a option to make the Clipboard size bigger for Copy Paste.
If I like to Copy something like a long Query string I get ...... at the end.

SELECT axgroups.*, axio.TimeX101, axio.TimeX102, axio.TimeX103, axio.TimeX104, axio.FirstCharX201, axio.FirstCharX202, axio.FirstCharX203, axio.FirstCharX204, axio.HaveReaderTime, axio.AXConnectX201, axio.AXConnectX202, axio.AXConnectX203, axio.AXConnectX204, axio.APBXReader1, axio.APBXReader2, axio.APBXReader3, axio.APBXReader4, axio.X101, axio.X102, axio.X103, axio.X104 FROM axgroups, axio WHERE axgroups.Client = 'RS Support' AND axio.Client = 'RS Support' AND axgroups.ModuleName = 'Singel Module' AND (axgroups.TagNumber LIKE '%0000000036A5813C%' OR axgroups.TagNumber LIKE '%36A5813C%') AND axio.AXName = 'Singel Module' AND axgroups.UserUsing = 1 AND axgroups.ConX201 = '1' WHERE axgrou......

SELECT axgroups.*, axio.TimeX101, axio.TimeX102, axio.TimeX103, axio.TimeX104, axio.FirstCharX201, axio.FirstCharX202, axio.FirstCharX203, axio.FirstCharX204, axio.HaveReaderTime, axio.AXConnectX201, axio.AXConnectX202, axio.AXConnectX203, axio.AXConnectX204, axio.APBXReader1, axio.APBXReader2, axio.APBXReader3, axio.APBXReader4, axio.X101, axio.X102, axio.X103, axio.X104 FROM axgroups, axio WHERE axgroups.Client = 'RS Support' AND axio.Client = 'RS Support' AND axgroups.ModuleName = 'Singel Module' AND (axgroups.TagNumber LIKE '%0000000036A5813C%' OR axgroups.TagNumber LIKE '%36A5813C%') AND axio.AXName = 'Singel Module' AND axgroups.UserUsing = 1 AND axgroups.ConX201 = '1';

I hope there is something to do about this.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that the spoiler buttons only make it more difficult to read the post.

I've tested it with this code and the complete string is copied to the clipboard:
B4X:
Dim s As String = $"SELECT axgroups.*, axio.TimeX101, axio.TimeX102, axio.TimeX103,
axio.TimeX104, axio.FirstCharX201, axio.FirstCharX202, axio.FirstCharX203, axio.FirstCharX204,
axio.HaveReaderTime, axio.AXConnectX201, axio.AXConnectX202, axio.AXConnectX203, axio.AXConnectX204,
axio.APBXReader1, axio.APBXReader2, axio.APBXReader3, axio.APBXReader4, axio.X101, axio.X102, axio.X103,
axio.X104 FROM axgroups, axio WHERE axgroups.Client = 'RS Support' AND axio.Client = 'RS Support' AND axgroups.ModuleName = 'Singel Module' AND (axgroups.TagNumber LIKE '%0000000036A5813C%' OR axgroups.TagNumber LIKE '%36A5813C%') AND axio.AXName = 'Singel Module' AND axgroups.UserUsing = 1 AND axgroups.ConX201 = '1';"$

fx.Clipboard.SetString(s)
Log(s.Length)
Log(fx.Clipboard.GetString.Length)

Note that the logs might truncate long lines so test it by pasting in the IDE.
 
Reactions: mis
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
I've tested it with this code and the complete string is copied to the clipboard
Maybe I have explain this wrong.
The string is copy from the IDE in Debug mode point on the string and then copy with right button.
Copy value to clipboard.
Also when you Log this long string it is cut off in the Log window.
Its not only this string nut all very long strings.
 
Last edited:
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
The logs truncate long strings. It is not a real issue.
No that's not a real problem but the Copy value to clipboard it is.

I use this to check if strings have the correct value. If this is cut off I can not check.
For SQL Query's thews are create by code so I don't know exactly what the result is.

I like to copy them and execute this in HeidiSQL for testing to see if the result is what I like.
HeidiSQL(Very nice SQL Editor and Freeware)

Somewhere in the IDE must be a number that tells how big this Copy buffer can be I asume.
 
Upvote 0

inakigarm

Well-Known Member
Licensed User
Longtime User
+1
I'd like a log/instant value that had the full string at disposal; maybe an IDE Parameter to configure the length of log buffer.

E.g: When creating a large query it's useful to test it on external DB
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
E.g: When creating a large query it's useful to test it on external DB
The Query's are created by code and some times very complex. That's the reason I copy them in Debug from the IDE and test them with HeidiSQL(DB).
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
It is not related to the clipboard. It is related to the logger itself which limits the items to 500 characters. It is currently not configurable.

You can use File.WriteString(File.DirApp, "MyQuery.txt", s) to write to a file instead.

Thanks Erel

Will this 500 char be changed in the feature?
I write the Query already to a file.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…