FoxPro Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Visual FoxPro Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
Socket
Spider
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
DKIM / DomainKey
NTLM
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
FileAccess
Bzip2
LZW

 

Non-Chilkat Links
Text and String Handling

SSH Tunnel for Database Connection (such as ADO, ODBC, etc.)

Demonstrates how to create an SSH tunneling client in a background thread of your application. This makes it possible to SSH tunnel database connections without the need for separate software (such as PuTTY) to be running.

LOCAL loSshTunnel
LOCAL lnSuccess
LOCAL lnListenPort
LOCAL lnMaxWaitMs

loSshTunnel = CreateObject('Chilkat.SshTunnel')

lnSuccess = loSshTunnel.UnlockComponent("30-day trial")
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loSshTunnel.LastErrorText)
    QUIT
ENDIF

*  The destination host/port is the database server.
*  The DestHostname may be the domain name or
*  IP address (in dotted decimal notation) of the database
*  server.
loSshTunnel.DestPort = 1433
loSshTunnel.DestHostname = "myDbServer.com"

*  Provide information about the location of the SSH server,
*  and the authentication to be used with it. This is the
*  login information for the SSH server (not the database server).
loSshTunnel.SshHostname = "192.168.1.108"
loSshTunnel.SshPort = 22
loSshTunnel.SshLogin = "mySshLogin"
loSshTunnel.SshPassword = "mySshPassword"

*  Start accepting connections in a background thread.
*  The SSH tunnels are autonomously run in a background
*  thread.  There is one background thread for accepting
*  connections, and another for managing the tunnel pool.

lnListenPort = 3316
lnSuccess = loSshTunnel.BeginAccepting(lnListenPort)
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loSshTunnel.LastErrorText)
    QUIT
ENDIF

*  At this point you may connect to the database server through
*  the SSH tunnel.  Your database connection string would
*  use "localhost" for the hostname and 3316 for the port.
*  We're not going to show the database coding here,
*  because it can vary depending on the API you're using
*  (ADO, ODBC, OLE DB, etc. )

*  This is where your database code would go...

*  When you're finished with the database connection, you may
*  stop the background tunnel threads:
*  Stop the background thread that accepts new connections:
lnSuccess = loSshTunnel.StopAccepting()
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loSshTunnel.LastErrorText)
    QUIT
ENDIF

*  If any background tunnels are still in existence (and managed
*  by a single SSH tunnel pool background thread), stop them...

lnMaxWaitMs = 1000
lnSuccess = loSshTunnel.StopAllTunnels(lnMaxWaitMs)
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loSshTunnel.LastErrorText)
    QUIT
ENDIF

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

Mail Component · .NET Email Component · ASP Mail Component · XML Parser