Deploying ASA6 and using DSN-less connections... #2

Hi,

After much research and trial and error, I have come up with a method of
easily deploying ASA6 with my PowerBuilder 5 application (I would imagine
all would still work with higher versions as well) and also of connecting to
my ASA database without creating an ODBC Data Source (DSN).

I noticed that this topic is asked about frequently, but I was unable to
find a simple solution so I'd lke to contribute this one.

I have tested this method on my Windows 95, 98 and 2000 environments, with
complete success.

If you have any comments about my method, please pass them along.
______________________________________________________

1 - Deploy these files along with your application EXE (in the same
directory):

    DBODBC6.DLL
    RTENG6.EXE (use DBENG6.EXE instead if you have paid for the licence to
do so)
    DBLGEN6.DLL
    DBLIB6.DLL
    DBSERV6.DLL
    DBODTR6.DLL

2 - If ASA 6 is being used with PowerBuilder 5, the PBODB050.INI file MUST
contain an entry for [Adaptive Server Anywhere] with the same contents as
the
existing [Sybase SQL Anywhere] section.

    [Adaptive Server Anywhere]
    PBSyntax='WATCOM50_SYNTAX'
    PBDateTime='STANDARD_DATETIME'
    PBFunctions='WATCOM_FUNCTIONS'
    PBDefaultValues='autoincrement,current date,current time,current
timestamp,timestamp,null,user'
    PBDefaultCreate='YES'
    PBDefaultAlter='YES'
    PBDefaultExpressions='YES'
    DelimitIdentifier='NO'
    PBDateTimeInvalidInSearch='NO'
    PBTimeInvalidInSearch='YES'
    PBQualifierIsOwner='NO'
    PBSpecialDataTypes='WATCOM_SPECIALDATATYPES'
    IdentifierQuoteChar='"'
    PBSystemOwner='sys,dbo'
    PBUseProcOwner='YES'
    SQLSrvrTSName='YES'
    SQLSrvrTSQuote='YES'
    SQLSrvrTSDelimit='YES'
    ForeignKeyDeleteRule='Disallow if Dependent Rows Exist (RESTRICT),Delete
any Dependent Rows (CASCADE),Set Dependent Columns to NULL (SET NULL)'

3 - Create a function that just establishes an "ODBC Driver" pointing to
your ASA files:

For example, my function is called f_setup_sqlany6_odbc_driver(string
fas_odbc_driver_name)

RegistrySet("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC DRIVERS", &
 fas_odbc_driver_name, "Installed")

RegistrySet("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\"+fas_odbc_driver
_name, &
 "Driver", gstr_global_vars.s_app_run_directory+"DBODBC6.dll")
RegistrySet("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\"+fas_odbc_driver
_name, &
 "Setup", gstr_global_vars.s_app_run_directory+"DBODBC6.dll")

4 - Use something like this for your 'connect' coding:

    String ls_my_ODBC_driver_name = "Sybase_ASA6_for_MyApp"

    // Specify everything in the 'Connectstring' so an actual ODBC DSN is
not necessary
    // We still need to have the 'ODBC Driver' defined for the workstation,
though.

    Transaction ltr_temptrans
    ltr_temptrans = CREATE TRANSACTION
    ltr_temptrans.dbms = "ODBC"
    ltr_temptrans.dbparm = "Connectstring ="+&
            "'Driver="+ls_my_ODBC_driver_name+";UID=dba;PWD=pwd;"+&

"DatabaseFile="+gstr_global_vars.s_app_run_directory+"MyDB.DB;"+&
            "Start="+gstr_global_vars.s_app_run_directory+"RTENG6.EXE -Q -c
8m;"+&
            "AutoStop=yes',DisableBind = 1"
    //////////////////////////////////////////////////////////////////

    CONNECT USING ltr_temptrans;

    if ltr_temptrans.sqlcode = 0 then
        // All is good!
    else
        // Try to re-establish the ODBC Driver and CONNECT again
        f_setup_sqlany6_odbc_driver(ls_my_ODBC_driver_name)

        CONNECT USING ltr_temptrans;
    end if

    ///  This function displays the DB Error Message if applicable
    if f_db_error(ltr_temptrans) then
        // No need to continue
        RETURN
    else
        // All is good, keep going..
    end if
______________________________________________________

That's it!!!


0
Dave
2/12/2002 10:30:05 PM
sybase.powerbuilder.database 9855 articles. 2 followers. Follow

0 Replies
417 Views

Similar Articles

[PageSpeed] 14

Reply:

Similar Artilces:

Deploying ASA6 and using DSN-less connections...
Hi, After much research and trial and error, I have come up with a method of easily deploying ASA6 with my PowerBuilder 5 application (I would imagine all would still work with higher versions as well) and also of connecting to my ASA database without creating an ODBC Data Source (DSN). I noticed that this topic is asked about frequently, but I was unable to find a simple solution so I'd lke to contribute this one. I have tested this method on my Windows 95, 98 and 2000 environments, with complete success. If you have any comments about my method, please pass them along. ...

Can I use DSN less to connect database
Hi, Can I use DSN less to connect database, like connect to *.mdb? from LEO ...

DSN less connection with powerbuilder 11.2
Can anyone please let me know to give DSNless connection with SQL Anywhere database in powerbuilder 11.2. It would be very helpful to me With thanks Polachan ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp Polachan, The basic trick is to pass in the "DRIVER" argument in the connection string - the SQL Anywhere ODBC driver must still be present on the system. "DRIVER=SQL Anywhere 11;UID=dba;PWD=sql;ENG=MyEngine;..." Regards, POLACHAN wrote: > Can anyone please let me know to give DSNless con...

Using 2 connections to 2 ASE-databases using SYC adapative server enterprice driver
Help! I have a problem making 2 ASE database connections in 1 application. I use a default transaction object SQLCA to connect to 1 ASE database and a self-defined transaction object to connect to the other database. It is not possible to save such an application, because when I make a connection in Powerbuilder to both databases via an SYC Adaptive Server Enterprise driver en then save it, the tables of the not active database are not reckognized. When I make a connection via the ODBC driver it works, but other error messages occur. What is the problem with connection to 2 ASE d...

Connect to 2 databases, but no use 2 phase commit
I have a component submitted to the thread manager a service component that wakes and sleeps. When it wakes, it should connect to multiple connection caches, gather some statistics, update a value and then disconnect and move to the next connection cache. It's giving me errors about 2-phase commit. I understand why I get the error. If I don't care about 2 phase commit (if one update fails, the other can commit, data integrity is no real concern here since the update is basically just "I was here" - not mission critical) can I do this with one component call, or...

How to connect to 2 database using one Connection at a time
Just assume,I have 2 databases configured in single sql server and each database contains one table. Now my requirement is to join these 2 tables which are in 2 different database. This is something like under .\sqlexpress we can see many database like Northwing,DB1 and DB2  etc.... Now i want to join 2 tables from different databases. Here i know the SQL join query but my problem is to create the Connection string....i dont know how to create one connection string that connects to these 2 database and gives me the output.Am trying it in  VB6 ........

Powerbuilder components use only 1 connection from connection cache #2
Hi all, I'm currently investigating a performance bottleneck in jaguar. I've reported this problem before and got some helpful hints from this forum so I'm back for more, since the hints weren't helpful enough. I have a web application which uses Powerbuilder components as the backend. Even when I generate 30 calls that each take 1 minute, the Jaguar server reports that it uses only one connection!! When I check oracle, it reports that only one session is active from the Jaguar server. Now I can just handle this if it was only one session but when i tested this f...

How to connect DBClient using a DSN-less connection in a VB5 App
I have a VB5 app connecting to SLQ Anywhere without a data source name - no problem. I am changing the app to a multi-user environment using SLQ Anywhere Server & SQL Anywhere Client. I can connect with a DSN - no problem; the ODBC dialog screen comes up. I don't want to setup a DSN on all the machines in the office if I don't have to. We are running Novell (I think 3.1, maybe 4.0) Here is the code for the standalone version DSN-less- works fine. RDOConnect = "UID=rico;PWD=rico;DBF=" + DBPath + "\ricoapp.DB;DRIVER=Sybase SQL Anywhere 5.0;DSN=&#...

DSN-Less connection #2
I am attempting an ASA7 - DSN-Less connection through an IIS process. This works fine in ASA5 but won't work with ASA7 ? I know my connection strings are correct, because if I execute the code "locally" it works. It's only failing when it is run through IIS. I gave administrator rights to IWAM_<computername> but still doesn't work. Thanks What is your connection string (DSN-less connection)? "Ray Norrish" <ray@careervision.co.uk> wrote in message news:bZXm$LCVCHA.258@forums.sybase.com... > I am attempting an ASA7 - DSN-Less...

Database Connectivity ( DSN Less )
HI i have made a connection to MSSQL database with DSN . can we make a connection without DSN . thanks tan ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp If the ODBC driver allows you to specify all the connection parameters via DBParm, you can connect without a DSN. I have done it with ASA, but not MSSQL. "tan" <mrdragon13@yahoo.com> wrote in message news:#9rbXaRPBHA.150@forums.sybase.com... > HI > i have made a connection to MSSQL database with DSN . can we make a connection > without DSN...

What i-connect driver can be used for Powerbuilder 10.2.1 connect to Informix 11.50?
We have powerbuilder 10.2, it use i-connect 2.8.1 to connect to informix v7.3 database, we are planning to upgrade informix to version 11.5, can someone tell me what version of i-connect (or informix client sdk) can work with powerbuilder 10.2 and informix 11.50? what powerbuilder native driver need to be installed? can we use the most recent i-connect version v3.5 and "IN9 informix v9.x" native drive? anybody have any issue with this setup? Thank you in advance. ...

What i-connect driver can be used for Powerbuilder 10.2.1 connect to Informix 11.50?
We have powerbuilder 10.2, it use i-connect 2.8.1 to connect to informix v7.3 database, we are planning to upgrade informix to version 11.5, can someone tell me what version of i-connect (or informix client sdk) can work with powerbuilder 10.2 and informix 11.50? what powerbuilder native driver need to be installed? can we use the most recent i-connect version v3.5 and "IN9 informix v9.x" native drive? anybody have any issue with this setup? Thank you in advance. Sorry, is the the correct place to post my question? any TeamSybase member can help? Thanks Tony I thin...

What i-connect driver can be used for Powerbuilder 10.2.1 connect to Informix 11.50?
We have powerbuilder 10.2, it use i-connect 2.8.1 to connect to informix v7.3 database, we are planning to upgrade informix to version 11.5, can someone tell me what version of i-connect (or informix client sdk) can work with powerbuilder 10.2 and informix 11.50? what powerbuilder native driver need to be installed? can we use the most recent i-connect version v3.5 and "IN9 informix v9.x" native drive? anybody have any issue with this setup? Thank you in advance. Please see you original post. Tony wrote: > We have powerbuilder 10.2, it use i-connect 2.8.1 to connec...

Problem connecting 2 databases in the same machine. One database is running in a LAN the other in WAN, both are using NT SERVER...
Hi!!!! SQL ANYWHERE 5.5.04 Build #1867. It is possible to connect from one machine to two databases, one in a LAN another in a WAN??? I can open my WAN database alone, only. I can open my LAN database alone, only. But, If I have the WAN open and try to open the LAN db I get a connection error. If I have a LAN open and try to connect to my db in the WAN. I get a connection error. Is this possible? Do I need some special parameters??? Jos� R. Rivera Did you try the things I suggested in my reply to your Saturday mail? Regards, Thomas Sandberg, GraFu AB Jose ...

Web resources about - Deploying ASA6 and using DSN-less connections... #2 - sybase.powerbuilder.database

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Ben Garcia gives Penrith Panthers a new French connection
Should he jag a game in the NRL, Ben Garcia will become just the third genuine French import to do so.

Man Charged With Aggravated Arson In Connection To Columbus Warehouse Fire
Police have charged 30-year-old Robin Toms with aggravated arson.

This Is How Facebook Is Working to Improve Experience On Slower Connections
... the globe, that’s not their situation . In recent years, Facebook has paid close attention to its user experience on 2G and other slow connections. ...

Addappt now lets you block contacts and connections
... gives you even more control than before. New features Block a current contact from connecting if they use Addappt down the road Block a connection ...

Facebook becomes more adept at dealing with crappy connections
... to get a decent phone signal to allow you to post a photo of your meal. Joking aside, in countries where people are struggling with 2G connections ...

Internet connections at UK universities have been knocked out by a 'persistent' cyber attack
... internet following a targeted cyber attack on a nationwide education network. The University of Manchester said on Tuesday its internet connection ...

Resources last updated: 12/16/2015 10:56:50 PM