Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

SQL Server Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(SQL Server) ZATCA Decode QR Code

See more ZATCA Examples

Decodes a base64 ZATCA QR code.

Note: This example requires Chilkat v9.5.0.92 or greater.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    -- Note: This example requires Chilkat v9.5.0.92 or greater.

    DECLARE @qr nvarchar(4000)
    SELECT @qr = 'ARdBaG1lZCBNb2hhbWVkIEFMIEFobWFkeQIPMzAwMDc1NTg4NzAwMDAzAxQyMDIyLTAzLTEzVDE0OjQwOjQwWgQHMTEwOC45MAUFMTQ0LjkGLCtiQTFtdWNWSTY3SDRXQ2JOL2U5SjJxVXBIVHQzVHdNZHhsa09XVGVvdjg9B2BNRVlDSVFDWWg1ZTNpcklxV2w1WXRhQ25LaXVqTUlUbW9rWFlPUE1wSURDSW9XVzc5d0loQU1YbWMrTUZIR3RhZUJzZU91RUdUbHdENmcwOWdOUVBSUHVZODlzNjVPV1MIWDBWMBAGByqGSM49AgEGBSuBBAAKA0IABNMAr2WtNWSj2uSrplhxz0cNFk/hv1LjMDgqbthcn6ydNWEuTNTQeyZJf1SfyMOFFM4cMpp+3wL+65Rj3fi+4w0JSDBGAiEAlcAzHKujzvjHJrAV1M/79RnYRqe66kmtgMUykr/N/CACIQDgTQwbfftw0pYo6FX8c63Q4edvFgt+7JhHaBlla0qRtQ=='

    SELECT @qr = 'AQxGaXJveiBBc2hyYWYCCjEyMzQ1Njc4OTEDEzIwMjEtMTEtMTcgMDg6MzA6MDAEBjEwMC4wMAUFMTUuMDAGLDlmc3JYVW8rU3BYQVlJTkw5aGFLU2dEOXgxaVJsZk53SVBDZnBlWXczYTA9B1hYMEM4VjFIL3hUMGdOaytWWXh2U2Z6UFJlUjZPM2t5VXA0TERITzJLMzlNSGJETXVvTGltQSt3RnovV2pVdEdMSHpaK0J5enNmWUdEQzliNUFGSU1FQT09CFgwVjAQBgcqhkjOPQIBBgUrgQQACgNCAARw3B+mu14x0h3pJFKqEWWT7DmD7jWYkZV7qHyikPlN4P/4/b7YD+A9wnFI92HTKm+/BGKXVf/pfLtsmdIIaPHnCUgwRgIhAMTjOkWwcNu5Aw5k1Yr3YgbPhdxKoJV1a3+5ShPtx1/IAiEAyrwsA/NuqV6XjybyrZpMp6eJAqslACLfCldti/PVOQs='

    DECLARE @bd int
    -- Use "Chilkat_9_5_0.BinData" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.BinData', @bd OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int
    EXEC sp_OAMethod @bd, 'AppendEncoded', @success OUT, @qr, 'base64'

    DECLARE @index int
    SELECT @index = 0
    DECLARE @expectedTag int
    SELECT @expectedTag = 1
    DECLARE @tag int

    DECLARE @len int

    DECLARE @tagValue nvarchar(4000)

    WHILE (@expectedTag <= 9)
      BEGIN

        -- Get the tag
        EXEC sp_OAMethod @bd, 'GetByte', @tag OUT, @index
        IF @tag <> @expectedTag
          BEGIN

            PRINT 'Expected tag ' + @expectedTag
            EXEC @hr = sp_OADestroy @bd
            RETURN
          END

        SELECT @index = @index + 1
        EXEC sp_OAMethod @bd, 'GetByte', @len OUT, @index
        IF @len = 0
          BEGIN

            PRINT 'Expected length > 0'
            EXEC @hr = sp_OADestroy @bd
            RETURN
          END

        SELECT @index = @index + 1
        -- Tags 8 and 9 contain binary data.
        IF @expectedTag >= 8
          BEGIN
            EXEC sp_OAMethod @bd, 'GetEncodedChunk', @tagValue OUT, @index, @len, 'base64'
          END
        ELSE
          BEGIN
            EXEC sp_OAMethod @bd, 'GetTextChunk', @tagValue OUT, @index, @len, 'utf-8'
          END


        PRINT 'tag ' + @tag + ': ' + @tagValue

        SELECT @index = @index + @len
        SELECT @expectedTag = @expectedTag + 1
      END

    EXEC @hr = sp_OADestroy @bd


END
GO

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.