@Jeff_Perkinson
Looking more into this I can't explain this behavior. I'm able to get values from the exact same table and connection string through python. For whatever reason JMP blanks out the column as soon as it hits 65537.
Names default to here(1);
driver = "ODBC Driver 17 for SQL Server"; // using SQL Server
server = "localhost";
database = "Test";
username = "sa";
password = "REDACTED";
cxn_string = "DRIVER="||driver||";SERVER="||server||";UID="||username||";PWD="||
password||";Database="||database;
cxn = create database connection(cxn_string);
executesql(cxn,
"
CREATE TABLE [dbo].[LargeChar](
[LargeCharID] [bigint] IDENTITY(1,1) NOT NULL,
[SomeBigChar] [varchar](MAX) NOT NULL,
CONSTRAINT [PK_Blob] PRIMARY KEY CLUSTERED
(
[LargeCharID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
"
);
executeSQL(cxn,
"INSERT INTO [LargeChar]
VALUES('"||REPEAT("A", 100000)||"')"
);
dt_download = executeSQL(cxn,
"SELECT SomeBigChar
, SubString(Convert(VARCHAR(MAX), SomeBigChar), 1, 65536) AS Char65536 -- this works
, SubString(Convert(VARCHAR(MAX), SomeBigChar), 1, 65537) AS Char65537 -- this doesn't
FROM [LargeChar]",
"This should work?"
);
show(length(dt_download:SomeBigChar[1]), // full text doesn't show
length(dt_download:Char65536[1]), // text that is only 65536 shows
length(dt_download:Char65537[1]) // text that is one higher? nope
);
//execute SQL(cxn, "DROP TABLE [LargeChar]");
close database connection(cxn);
//Python script returns
/*
0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Name: SomeBigChar, dtype: object
0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Name: Char65536, dtype: object
0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Name: Char65537, dtype: object
*/
Is there something that I'm missing? Or maybe underneath python is adding some functionality.
*EDIT* sorry for so many edits. Hope you don't get an email for each one.