C
Colin
Hi there,
I have wrote a simple console app in C# to get the
dimensions for a jpeg file
/***
Image img = Image.FromFile(@"C:\TEMP\PvFile\1036437.jpg",
true);
LogEvent("Height = " + img.Height.ToString() + "; Width
= " + img.Width.ToString());
****/
But when I call this console app from a SQL query
analyzer, it throws an error, says "The type initializer
for "System.Drawing.SafeNativeMethods" threw an exception."
/* The T-SQL for running this app*
DECLARE @cmd varchar(1024)
SET @cmd = 'C:\PdfExtractor\P2I.Utilities.Pdf2Text.exe'
EXEC master.dbo.xp_cmdshell @cmd
/****/
Does this has something to do with permission? Because if
I run this app from the command line, it runs OK without
error.
regards,
Colin
I have wrote a simple console app in C# to get the
dimensions for a jpeg file
/***
Image img = Image.FromFile(@"C:\TEMP\PvFile\1036437.jpg",
true);
LogEvent("Height = " + img.Height.ToString() + "; Width
= " + img.Width.ToString());
****/
But when I call this console app from a SQL query
analyzer, it throws an error, says "The type initializer
for "System.Drawing.SafeNativeMethods" threw an exception."
/* The T-SQL for running this app*
DECLARE @cmd varchar(1024)
SET @cmd = 'C:\PdfExtractor\P2I.Utilities.Pdf2Text.exe'
EXEC master.dbo.xp_cmdshell @cmd
/****/
Does this has something to do with permission? Because if
I run this app from the command line, it runs OK without
error.
regards,
Colin