In the Bentley ProjectWise Integration Server, there is a SQL table full of MIME datatypes. We recently had to adjust the MIME type for PDF files. This SQL segment allows you to change the MIME type in bulk for all of your documents of this extension. I wrote a VB.NET application that implements this SQL code, but you can do it directly in SQL Studio 2005/2008, and on.
Try
OpenValidConnection()
oSQLConn.Open()
Dim SqlCommand1 As String
SqlCommand1 = "UPDATE dms_doc _
SET dms_doc.o_mimetype = _
'application/pdf' WHERE _
(o_mimetype LIKE '%unknown%') _
AND (o_filename LIKE '%.pdf%')"
Dim command As New SqlCommand(SqlCommand1, oSQLConn)
Dim dr As SqlDataReader
dr = command.ExecuteReader()
oSQLConn.Close()
MsgBox("dms_doc Table -> _
PDF has been updated!", _
MsgBoxStyle.Information, "Success")
Catch ex As Exception
MsgBox(ex.Message, _
MsgBoxStyle.Critical, "Error")
End Try
Various Scripts and Application Code Segments for .NET, VB, C#, C++, C, Java, JavaScript, HTML, Python, Perl, AutoIT, Batch, ASP Classic, Objective-C, Swift, Unreal Engine 4, Unity3D & others. Also contains numerous IT tidbits, procedures, and tricks including Technology Hacks on various platforms.
Subscribe to:
Post Comments (Atom)
Generating "Always On Top" NSWindow in macOS across all detected displays
Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift Langues, you m...
-
In Unreal Engine 4 you will eventually need Linear Interpolation between two values to do something like ping pong between two float val...
-
Recently Possess () has been deprecated from UE4 , and when writing classes based on AAIController you have to use the function OnPossess ...
-
Often we intermingle C++ and Blueprints, and need for the two to communicate. With Behavior Trees, using ENUMs is an everyday occurrence an...
No comments:
Post a Comment