This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
//list all the JDBC drivers for diagnosis purpose | |
factory = createObject("java","coldfusion.server.ServiceFactory"); | |
writeDump(factory.dataSourceService.getDrivers()); | |
fileName = "d:/temp/temp.mdb"; | |
classLoader = createObject("java","java.lang.Class"); | |
driver = classLoader.forName("sun.jdbc.odbc.JdbcOdbcDriver"); | |
//connect to MDB using 64-bit java and 64-bit MS Access Driver | |
connStr = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" & fileName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
private struct function test() { | |
if(1 == 1) { | |
if(1 == 0) { | |
writeOutput("1==0"); | |
}; | |
writeOutput("true"); | |
return {data = 1}; | |
} | |
writeOutput("false"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://gist.github.com/467670.js?file=gistfile1.sql"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RIGHT('00000' + CAST(myNumber AS VARCHAR), 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sp_configure 'clr enabled', 1 | |
GO | |
RECONFIGURE | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS (SELECT * FROM sys.assembly_modules WHERE assembly_class='ConcateAll') | |
BEGIN | |
DROP AGGREGATE dbo.ConcateAll | |
END | |
IF EXISTS (SELECT * FROM sys.assemblies WHERE name='SQLCLR') | |
BEGIN | |
DROP ASSEMBLY [SQLCLR] | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE ASSEMBLY [SQLCLR] | |
FROM 'c:\temp\SQLCLR.dll' | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE AGGREGATE dbo.ConcatAll(@input NVARCHAR(4000)) | |
RETURNS NVARCHAR(4000) | |
EXTERNAL NAME SQLCLR.ConcatAll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT EXECUTE ON ConcateAll To my_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buttonMode = true; | |
useHandCursor = true; |
OlderNewer