• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

How to access Media Object Text - External from JDE

Larry_Jones

Legendary Poster
For those like us who use MO Text external to JDE (utilizing SQL, Reportwriters, Forms Management, etc) here is a DB Function for SQL Server that converts the Text to readable format:

--------------------------------------------------------
USE [JDE_PRODUCTION]
GO
CREATE FUNCTION dbo.JDETEXTFIX
( @TXFT image )
RETURNS nvarchar(max) AS
BEGIN
RETURN cast(cast(@TXFT as varbinary(max)) as nvarchar(max))
END
GO
GRANT EXECUTE ON DBO.JDETEXTFIX TO PUBLIC;
--------------------------------------------------------

Use it in a SELECT like this:

SELECT
F00165.GDOBNM,
F00165.GDTXKY,
F00165.GDMOSEQN,
F00165.GDGTMOTYPE,
F00165.GDGTFUTS1,
DBO.JDETEXTFIX(F00165.GDTXFT)
FROM F00165
WHERE F00165.GDGTMOTYPE = 0
 
Top