Oracle Forms 11g Development Installation Tips

Yeah I actually said Oracle Forms, that product from the 90’s… as one might guess, i happen to be on a legacy conversion project at work…

There’s some rough edges getting these old bits to install and run that i wanted to capture…

PHP SQL Server blob hosting

from here see this post for sql server driver downloads   downloadPDF.php <?php header('Content-type: application/pdf'); // leave this out to open directly in browser: header('Content-Disposition: attachment; filename="my.pdf"'); include("SQLConnect.php"); $sql = "select InvoiceDocument from SalesInvoicePDF where InvoiceID = '123'"; $stmt = sqlsrv_query($conn, $sql); if ( sqlsrv_fetch($stmt) ) { //this pulls the first field via "0" $data = sqlsrv_get_field($stmt, 0, SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY)); // write binary sql stream directly to http response fpassthru($data); } ?

Using “C# Interactive” aka CSI/CSX for ETL

motivation interactive C# offers typical REPL benefits ala powershell without the mental context switch required to leave our beloved C# syntax =)   notable great MSDN reference article CSX syntax can be executed from either Visual Studio 2015 (as of update 1) > View > Other Windows > C# Interactive -or- C:\Program Files (x86)\MSBuild\14.0\bin\csi.exe then #load file.csx Extract this example is based on a low fidelity web page as the raw data source


get the DLL – grab latest add to your php.ini extension list: [ExtensionList] extension=php_pdo_sqlsrv_7_nts.dll here’s sample call code: <?php try { $conn = new PDO( "sqlsrv:Server= ip_address; Database = mydb ", $user, $pwd); $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); } catch(Exception $e){ die(var_dump($e)); } $stmt = $conn->query($qry); $result = $stmt->fetchAll(); $row = $result[0]; $colval = $row[“fieldname”]; ?>

Shred GPX WPT XML with SQL Server

declare @xml xml = ‘ <wpt lat="35.0977419" lon="-80.89258"> <name>10112 Industrial Dr. Pineville, NC 28134, Pineville, NC, 28134</name> <desc>10112 Industrial Dr, Pineville, NC 28134, USA</desc> </wpt> <wpt lat="30.8276466" lon="-83.9967315"> <name>323 Industrial Blvd Thomasville, GA 31792, Thomasville, GA, 31792</name> <desc>323 Industrial Blvd, Thomasville, GA 31792, USA</desc> </wpt> <wpt lat="26.4237949" lon="-81.415628"> <name>283 E Jefferson St Immokalee, FL 34142, Immokalee, FL, 34142</name> <desc>283 Jefferson Ave E, Immokalee, FL 34142, USA</desc> </wpt> </gpx>' SELECT n.

SQL Server Aliasing

Done via “SQL Server Configuration Manager” > “SQL Native Client vXY.Z Configuration” > Aliases tip: SSMS.exe is a 32bit app (because Visual Studio, upon which it is based, still has a well established justification for 32bit) and therefore it depends on the (32bit) Client Configuration node above to find your server alias For mainstream sql server network client API based connections there is no need to put this alias anywhere else (i.

[SOLVED] SSRS (2012), Excel export, “Not a legal OleAut date” error

Cause For my situation, it wound up being that executing TimeSerial(0,0,secs) in some vbscript code, when the “secs” param value was greater than 24 hours. Analysis Somehow out of all the different formats SSRS will export to, the Excel output was the only one running into this issue. From the TimeSerial specs I don’t see anything inherently invalid about going that high… the docs indicate it simply rolls it into the day portion of the resulting value as I would expect.


-- this code returns the start and end datetime’s for DST in the current year -- DST begins at 2am on the SECOND SUNDAY of March and ends the FIRST SUNDAY of November SELECT DATEADD(HOUR, (MULTIPLIER + 7 /*skip the first week*/) * 24 /*24 hours a day*/ + 2 /*offset to 2am*/, StartWeek) AS StartDate, DATEADD(HOUR, MULTIPLIER * 24 + 2, EndWeek) AS EndDate FROM ( SELECT 0 AS MULTIPLIER, 1 AS DOW UNION ALL SELECT 6, 2 UNION ALL SELECT 5, 3 UNION ALL SELECT 4, 4 UNION ALL SELECT 3, 5 UNION ALL SELECT 2, 6 UNION ALL SELECT 1, 7 ) dow, (SELECT '03/01/' + convert(varchar, DATEPART(YEAR, GETDATE())) AS StartWeek, '11/01/' + convert(varchar, DATEPART(YEAR, GETDATE())) AS EndWeek ) DST WHERE DATEPART(WEEKDAY, StartWeek) = DOW

Enable SSL Connections to SQL Server

“SQL Server Transport Encryption” is a good Google phrase for this technology. Reference: Obtain an SSL Certificate A self signed certificate is easy and works fine... here’s one way: Get the IIS 6.0 Resource Kit Tools: All you'll need is the "SelfSSL.exe" tool so the custom install is minimal. Find SelfSSL.exe in default install path: C:Program FilesIIS Resources Good reference for SelfSSL usage: http://www.