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
-- MS SQL Server 2016 | |
-- Generate "create table" for each table within the schema | |
-- https://stevesohcot.medium.com/sql-to-generate-create-table-statements-for-all-tables-given-a-schema-in-ms-sql-server-046f7ffde9a6 | |
SELECT | |
'CREATE TABLE ' + SCHEMA_NAME(t.schema_id) + '.' + t.name + ' (' + | |
STUFF (( | |
SELECT ', ' + c2.name + ' ' + type_name(c2.user_type_id) + | |
CASE | |
WHEN c2.is_nullable = 1 THEN 'NULL' |
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
<?php | |
if (array_key_exists('signUpAttempt', $_POST)) { | |
$captcha = isset($_POST['g-recaptcha-response']) ? $_POST['g-recaptcha-response'] : null; | |
// ultimately these could be constants in a "secrets" file | |
// aka stored as environment variables | |
#$captchaPublic = constant('CAPTCHA_PUBLIC'); | |
#$captchaSecret = constant('CAPTCHA_SECRET'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Google reCAPTCHA Example</title> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | |
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Google reCAPTCHA Example</title> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | |
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" |
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
Private Function getInfoFromStoredProcedure() | |
Dim sheet As String | |
sheet = "Data" | |
Worksheets(sheet).Select | |
Range("A1").Select | |
Set rPrint = Worksheets(sheet).Range("A2") | |
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
Public Sub getDataFromRecordset() | |
Dim sheet As String | |
sheet = "Data" | |
Worksheets(sheet).Select | |
Range("A1").Select | |
Set rPrint = Worksheets(sheet).Range("A2") | |
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
Private Function getInfoFromStoredProcedure() As ADODB.Recordset | |
On Error GoTo Error: | |
Dim adoCon As ADODB.Connection | |
Dim adoCmd As ADODB.Command | |
Dim rst As New ADODB.Recordset | |
Set adoCon = New ADODB.Connection | |
Set adoCmd = New ADODB.Command |
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
Public Function getDataFromRecordset() | |
Dim sheet As String | |
sheet = "Output" | |
Worksheets(sheet).Select | |
Range("A1").Select | |
Dim strSQL As String | |
strSQL = "SELECT TOP 10 * FROM table" |
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
Const COL_FIRST_NAME = "A" | |
Const ROW_HEADER = "2" | |
Dim validation As Boolean | |
validation = validateColHeaders() | |
If validation = False Then | |
End | |
End If |
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
Const strDbConn As String = "server=server-goes-here;Database=db-goes-here;Trusted_Connection=Yes;Driver={ODBC Driver 17 for SQL Server}" | |
Private Function getInfoFromStoredProcedure() As ADODB.Recordset | |
On Error GoTo Error: | |
Dim adoCon As ADODB.Connection | |
Dim adoCmd As ADODB.Command | |
Dim rst As New ADODB.Recordset |
NewerOlder