Storing 32,767 wchar Filepaths in the DCT - Is Memo the only way?

Tags: #<Tag:0x00007f224e1302c8>

Maximum Path Length Limitation - Win32 apps | Microsoft Docs

Windows maximum length for a file path is 32,767 characters. The dct doesnt allow a cstring this size, I can only use a memo but I can only use 255 memo’s in table/file.

Is there any other way or best to just split the table and use 1:1 instead of the usual 1:M file relationship to overcome this limitation?

TIA

The reality is that most people are using NTFS and it has a maximum file length of 260.(or possibly just 256 when you remove the drive letter : \ )

1 Like

I’d probably use a blob if I had to store that much. Most of the time, it will store a lot less.

The limit you’re hitting could be driver related too. e.g., TPS only allows a 15000 byte record size.

The limit is driver related. I can define 64K strings using ODBC

As discussed in your previous question on 32k Max File Path … That is not possible in the ANSI API used by Clarion …

Those are UNICODE which the DCT does not support, and take 2x the Bytes so 64k bytes. Plus they often contain Chr(0) so an ANSI CSTRING cannot work.

The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters

Do you not recall this discussion that you started?

I know because I can use a cstring with 32767 chars as a global variable, the limits are the dct tables.

I’ve got to use Unicode for distributed databases. eg if a db is stored in one country and its got users from a variety of different countries, they will all have different ansi code pages so storing the data as unicode is the logical and best way to store the data.

I cant make the data in a database a “master” ansi code page, because an ansi code page omits symbols from other ansi code pages, so unless I’m writing a program and db for users in only one country, unicode has to come into play.

Now a company might have a policy where all their computers are configured to use one ansi code despite being located around the world which would make life easier, but not all companies do that.

Nothing conclusive really came from it.