TD MOBILE. Database Connectivity Guide. Product Version 2.0



Similar documents
TD MOBILE. Guide to Publishing Applications. Product Version 1.2

TEAM DEVELOPER. Your First.NET/WPF Application. Product Version 6.3

SQLBASE. Starter Guide. Product Version

TD MOBILE. NoSQL Data Operations. Product Version 2.0

SQLBASE. Console Guide. Product Version

NXJ. What s New in NXJ. Product Version 12.2

SQLBase. Starter Guide

Symantec Enterprise Vault Technical Note. Administering the Monitoring database. Windows

Symantec Backup Exec Management Plug-in for VMware User's Guide

Introducing Gupta Team Developer

Symantec Mobile Management for Configuration Manager

SQLConsole Guide Sqlconsole Guide Page 1

Symantec Indepth for. Technical Note

Using Backup Exec System Recovery's Offsite Copy for disaster recovery

Object Level Authentication

Symantec Enterprise Vault Technical Note. Troubleshooting Operations Manager. Windows

Dell Statistica. Statistica Document Management System (SDMS) Requirements

Symantec Enterprise Vault Technical Note. Troubleshooting the Monitoring database and agents. Windows

Symantec ESM agent for IBM AS/400

Dell Statistica Statistica Enterprise Installation Instructions

Patch Assessment Content Update Release Notes for CCS Version: Update

Dell InTrust Preparing for Auditing Microsoft SQL Server

Enabling Windows Management Instrumentation Guide

Enterprise Vault.cloud. Microsoft Exchange Managed Folder Archiving Guide

Configuring and Integrating Oracle

Failover Support. DataDirect Connect for ODBC Drivers. Introduction. Connection Failover

Dell Spotlight on Active Directory Server Health Wizard Configuration Guide

Introduction to Version Control in

Quick Reference. Administrator Guide

Symantec Backup Exec TM 11d for Windows Servers. Quick Installation Guide

Dell Statistica Document Management System (SDMS) Installation Instructions

Symantec Enterprise Security Manager Agent for Linux PPC 64 Release Notes

Boundary Encryption.cloud Deployment Process Overview

Quest SQL Optimizer 6.5. for SQL Server. Installation Guide

Symantec Backup Exec 2010 R2. Quick Installation Guide

Track and Trace. Administration Guide

Performance Best Practices Guide for SAP NetWeaver Portal 7.3

Symantec Enterprise Security Manager Oracle Database Modules Release Notes. Version: 5.4

Gain Control of Space with Quest Capacity Manager for SQL Server. written by Thomas LaRock

Netop Remote Control Security Server

Quick Start Guide for Symantec Event Collector for ForeScout CounterACT

SQLBase 8.0 and COM+ Transactions

Symantec Enterprise Security Manager Modules for Sybase Adaptive Server Enterprise Release Notes 3.1.0

Host OS Compatibility Guide

Veritas Cluster Server Database Agent for Microsoft SQL Configuration Guide

Symantec Enterprise Security Manager Modules. Release Notes

Backup Exec 15. Quick Installation Guide

ChangeAuditor 6.0. Web Client User Guide

Security Analytics Engine 1.0. Help Desk User Guide

Symantec ESM Agent For IBM iseries AS/400

Version Overview. Business value

Installing the BlackBerry Enterprise Server Management console with a remote database

formerly Help Desk Authority Quest Free Network Tools User Manual

Symantec Protection for SharePoint Servers Getting Started Guide

Enterprise Single Sign-On Installation and Configuration Guide

Foglight. Dashboard Support Guide

Quest vworkspace Virtual Desktop Extensions for Linux

"SQL Database Professional " module PRINTED MANUAL

Symantec Endpoint Protection 11.0 Architecture, Sizing, and Performance Recommendations

CA Nimsoft Monitor. Probe Guide for Lotus Notes Server Monitoring. notes_server v1.5 series

Simba ODBC Driver with SQL Connector for Apache Cassandra

Dell One Identity Cloud Access Manager How to Configure vworkspace Integration

Dell NetVault Backup Plug-in for Advanced Encryption 2.2. User s Guide

Symantec Database Security and Audit 3100 Series Appliance. Getting Started Guide

ACT! by Sage. Premium for Workgroups 2007 (9.0) Administrator s Guide to the ACT! Reader Utility

Symantec Managed PKI. Integration Guide for ActiveSync

formerly Help Desk Authority HDAccess Administrator Guide

Altiris Monitor Pack for Servers 7.1 SP2 from Symantec Release Notes

Veritas Cluster Server Application Note: Disaster Recovery for Microsoft SharePoint Server

10 Simple Steps for Boosting Database Performance in a Virtualized Environment

ChangeAuditor 5.6. For Windows File Servers Event Reference Guide

Symantec Protection Engine for Cloud Services 7.0 Release Notes

Symantec Mail Security for Microsoft Exchange Management Pack Integration Guide

Symantec Enterprise Vault

Crystal Reports Installation Guide

Foglight. Foglight for Virtualization, Enterprise Edition 7.2. Virtual Appliance Installation and Setup Guide

An Oracle White Paper June Creating an Oracle BI Presentation Layer from Imported Oracle OLAP Cubes

ASP.NET Programming with C# and SQL Server

Installing the BlackBerry Enterprise Server Management Software on an administrator or remote computer

4.0. Offline Folder Wizard. User Guide

Top 10 Most Popular Reports in Enterprise Reporter

System Requirements and Platform Support Guide

Veritas Operations Manager LDom Capacity Management Add-on User's Guide 4.1

Symantec Endpoint Encryption Device Control Release Notes

IBM Lotus Enterprise Integrator (LEI) for Domino. Version August 17, 2010

Symantec AntiVirus Corporate Edition Patch Update

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

SQLBase Database Administrator s Guide

PUBLIC Supplement for J.D. Edwards

SINGLE SIGNON FUNCTIONALITY IN HATS USING MICROSOFT SHAREPOINT PORTAL

Policy Based Encryption Essentials. Administrator Guide

Altiris Patch Management Solution for Windows 7.1 from Symantec Release Notes

Nimsoft Monitor Compatibility Matrix October 17, 2013

Symantec LiveUpdate Administrator. Getting Started Guide

Foglight for Oracle. Managing Oracle Database Systems Getting Started Guide

Symantec Enterprise Vault.cloud Compatibility List. March 13, 2015

Configuring and Integrating JMX

Transcription:

TD MOBILE Database Connectivity Guide Product Version 2.0

TD Mobile : Database Connectivity Guide, Product Version 2.0 The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement. Last updated: September 10, 2015. Legal Notice Copyright 2014-2015 Gupta Technologies, Inc. All rights reserved. Gupta, Gupta Technologies, the Gupta logo, Gupta Powered, the Gupta Powered logo, ACCELL, Centura, Centura Ranger, the Centura logo, Centura Web Developer, Component Development Kit, Connectivity Administrator, DataServer, Development Kit, ewave, Fast Facts, NXJ, Object Nationalizer, Quest, Quest/Web, QuickObjects, RDM, Report Builder, RPT Report Writer, RPT/Web, SQL/API, SQLBase, SQLBase Exchange, SQLBase Resource Manager, SQLConsole, SQLGateway, SQLHost, SQLNetwork, SQLRouter, SQLTalk, Team Developer, Team Object Manager, TD Mobile, Velocis, VISION, Web Developer and WebNow! are trademarks of Gupta Technologies and may be registered in the United States of America and/or other countries. SQLWindows is a registered trademark and TeamWindows, ReportWindows and EditWindows are trademarks exclusively used and licensed by Gupta Technologies. The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Gupta Technologies Corporation and its licensors, if any. THE DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. GUPTA TECHNOLOGIES, INC. SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE. This document may describe features and/or functionality not present in your software or your service agreement. Contact your account representative to learn more about what is available with this Gupta Technologies product. Gupta Technologies, Inc. 1420 Rocky Ridge Drive, Suite 380 Roseville, CA 95661 Gupta Technologies.com

Table of Contents INTRODUCTION... 4 PARAMETERS:... 4 RETURN VALUES:... 5 CONNECTING TO SQLBASE:... 6 CONNECTING TO SQLSERVER:... 7 VIA OLEDB:... 7 VIA ODBC:... 7 CONNECTING TO ORACLE:... 7 VIA.NET DATA PROVIDER:... 7 MANAGED DATA ACCESS... 8 SAMPLES:... 8

Introduction TD Mobile allows connecting to various backend databases natively including SQLBase, SQLServer and Oracle plus any ODBC or OLEDB compatible data sources. It uses Gupta's existing TD.NET runtimes, including our database assembly (gupta.td.runtime.database.dll). This assembly handles all connects, disconnects, fetches, executes, bind processing, etc. that occur in an application. All database interaction is done in the same manner as in traditional Team Developer applications. For example, use the function SqlPrepareAndExecute to prepare and execute your Selects, Updates, Deletes, etc., SqlFetchNext to move through your result set and so on. One area of difference between TD and TD Mobile applications is how connections should be handled. In traditional Team Developer applications, the system variables SqlDatabase, SqlUser, and SqlPassword are given values describing the connection and then the function SqlConnect is called to establish the connection. In TD.NET, these variables are implemented as static properties inside our underlying database class. In a TD Mobile environment, where a single copy of our database assembly is shared across all IIS connections, those properties are static across all the threads. This can result in multiple users setting those variables to new values all the time, possibly interfering with each other's changes. In addition, our existing database connectivity has built-in logic for a kind of pooling or recycling of connections but this logic also relies on static structures. So, different threads (users) could be trying to recycle other user s connections. Although the traditional connection methods of Team Developer may seem to work fine, under multiple user loads unpredictable results may occur due to its stateless nature. For this reason, we recommend using the TD.NET function "SqlConnectDotNet" to support connecting to databases with "connection strings". It is possible to connect to any database via OLEDB, ODBC or.net Data Provider. The format is: bok = SqlConnectDotNet(hSql, sconnectionstring, sinvariantname, nprovidertype) Parameters: hsql - Receive Sql Handle. This is a handle that identifies a database connection. 4

sconnectionstring - String. This is a.net connection string that contains all the information needed to connect to the database, including the username and password. sinvariantname - String. This is an ADO.NET invariant name, which should correspond to the invariant attribute of the factory entry in the section of your machine.config file, i.e. System.Data.SqlClient. Adaptive Server Anywhere: "ianywhere.data.sqlanywhere" DB2: "IBM.Data.DB2" Firebird: "FirebirdSql.Data.FirebirdClient" Ingres: "Ingres.Client" MySQL: "MySql.Data.MySqlClient" Oracle: ODP.NET: "Oracle.DataAccess.Client" Oracle: MS Oracle: "System.Data.OracleClient" SQLite: System.Data.SQLite" SQL CE: v3.0: "System.Data.SqlServerCe" SQL CE: v3.5: "System.Data.SqlServerCe.3.5" Sybase ASE: "Sybase.Data.AseClient" nprovidertype - Number. This is a DBP_PROVIDER constant that identifies the database provider you want to use. This should be one of the following values. DBP_PROVIDER_UNDEFINED=0 DBP_PROVIDER_SQLBASE_OLEDB=1 DBP_PROVIDER_SQLSERVER_OLEDB=2 DBP_PROVIDER_ORACLE_OLEDB=3 DBP_PROVIDER_ODBC=4 DBP_PROVIDER_ORACLE=5 DBP_PROVIDER_OLEDB=7 DBP_PROVIDER_SQLBASE=9 DBP_PROVIDER_SQLSERVER_SQLCLIENT=12 Return Values: 5

bok is TRUE if the function succeeds and FALSE if it fails. This function allows connections to arbitrary databases using a.net connection string. Unlike SqlConnect, this function does not rely on or check the value of SqlUser, SqlPassword, or SqlDatabase. Instead, all of the information needed to connect is stored in the connection string. This function has several benefits: It doesn t use the built-in connection pooling. It doesn t get the connection information from SqlDatabase/SqlUser/SqlPassword (or even sql.ini) but instead just takes a standardized.net connection string. By using SqlConnectDotNet to connect to the database, the connection process becomes fully thread safe. Fortunately, connection pooling is already built into most database drivers and is turned on by default, so you still have access to the performance benefit of ing. For SQLBase specifically, it is supported but *off* by default, so you need to add a tag to your connection string to turn pooling on. PoolSize=<#ofConnections>;ConnectionLifeTime=<In Seconds> Where PoolSize is the maximum size of the pool you want to maintain and ConnectionLifeTime is the longest amount of time you want an unused connection to remain in the pool before getting rid of it. Care and thought must also be given to the scope of any Sql Handle variables your application may use. It is possible to use a global variable as a Sql Handle and then just leave it connected between Operation invocations. Keep in mind that the user may navigate away from your application and you'll have no way of recognizing that condition, so the database connection will needlessly remain until the IIS session times out and the variable is destroyed. It is considered better practice, when possible, to do a connect and disconnect for each operation and not maintain a database connection "state". Connecting to SQLBase: It is possible to connect to SQLBase via Dot Net Provider, ODBC or OLEDB. The function call to connect to SQLBase via.net Provider will be similar to the following. 6

Call SqlConnectDotNet(hSql, 'servername=server1;hostname=localhost;port=2155;database=regis;user=sysadm;password=sysad m;poolsize=10;connectionlifetime=20;',, DBP_PROVIDER_SQLBASE ) Connecting to SQLServer: Via OLEDB: It is possible to connect to SQLServer via an OLEDB Provider. The function call will be similar to the following. Call SqlConnectDotNet(hSqlConnect, 'Provider=sqloledb;Data Source=KRAGAVAN15\\SQLEXPRESS;Initial Catalog=Test;User Id=Test;Password=test;', "", DBP_PROVIDER_SQLSERVER_OLEDB ) Via ODBC: It is possible to connect to SQLServer via ODBC as well. The function call will be similar to the following. Call SqlConnectDotNet(hSqlConnect, 'Driver={SQL Server Native Client 11.0};Server=KRAGAVAN15\\SQLEXPRESS;Database=TEST;Uid=test;Pwd=test;', "", DBP_PROVIDER_ODBC ) Connecting to Oracle: Via.Net Data Provider: Connection to Oracle can be established via.netdataprovider, OLEDB or ODBC. To establish connectivity use a call similar to the following. SqlConnectDotNet(hSqlConnect, 'Data Source=ORCLWin1252;User Id=support;Password=support;', "", DBP_PROVIDER_ORACLE ) 7

Managed Data Access TD Mobile uses Oracle.ManagedDataAccess.dll to connect to ORACLE. Oracle.ManagedDataAccess.dll is a full.net version and it does not require OCN libraries. You can install it by using ODP.NET, with either the 32- or 64-bit installer. Note that it uses a different location for tnsnames.ora than does the standard ORACLE client, and therefore it may disable the TNS name setting. Oracle.ManagedDataAccess.dll is also installed with the Oracle 12c client. If you install the client, then Oracle.ManagedDataAccess.dll shares the same tnsnames.ora with other Oracle client tools. Samples: Please refer to the samples installed by the TD Mobile setup in order to see how to use the connectivity functions described in this document. 8

Gupta Technologies 1420 Rocky Ridge Drive, Suite 380 Roseville, CA 95661 USA Phone: 1.916.928.6400 Toll Free: 1.800.468.6439 Fax: 1.916.928.6404 Germany: +49-(0)89-208039 158 United Kingdom: +44 (0)1753 245 510 France: +33 (0)1 72 86 60 77 9