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
Sub test___BuildUpsertSql() | |
Dim res As String | |
res = BuildUpsertSql("sample_table", _ | |
"sample_pkey", _ | |
"user_name, user_email, user_address", _ | |
"test_user, [email protected], Tokyo") | |
Debug.Print res | |
'# INSERT INTO sample_table( | |
'# user_name, user_email, user_address |
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
'# convert Illegal Windows filename characters | |
'# ex. Sheet<1> => Sheet_1_ | |
'# sample1 | |
Function ValidFileName(invalidFileName As Variant) As Variant | |
Dim invalidArray | |
invalidArray = Array("*", """", ":", ";", "\", "/", "<", ">", "[", "]", "|", ",", "?", ".") | |
Dim c As Variant | |
For Each c In invalidArray |
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
Option Declare | |
'#-------------------------------------------------------# | |
'# http://example.com/test.nsf/exportcsv?openagent #=> CSV File Download | |
'#-------------------------------------------------------# | |
Sub Initialize | |
'==================== | |
Dim session As New NotesSession | |
Dim db As NotesDatabase | |
Set db = session.CurrentDatabase |
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
# coding:utf-8 | |
# usage: ruby oracle_to_csv.rb > sample.csv | |
require 'rubygems' | |
require 'oci8' # before you need install : gem install ruby-oci8 | |
def csvout(user, pass, world, sql) | |
begin | |
ora = OCI8.new(user,pass,world) | |
c = ora.exec(sql) |
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
Option Declare | |
'#-------------------------------------------------------# | |
'# Decode URL Query String Parameters by Lotus Notes Agent Script. | |
'# | |
'# ex. http://example.com/test.nsf/agentname?openagent&title=%E3%83%88%E3%83%83%E3%83%97%E3%83%9A%E3%83%BC%E3%82%B8 | |
'# => arg_decoded = "トップページ" | |
'#-------------------------------------------------------# | |
Sub Initialize | |
Dim session As New NotesSession | |
Dim db As NotesDatabase |