Dynamically choose database

Hi,

PB 12.1.6518 / ASE 12.5.1 & open client SYC / Appeon 6.5

I am new to Appeon and request some assistance.

I have a C/S app that allows the user to select the DB to connect to at 
login time. I build the SQLCA properties based on the users' choice.

I have been trying to get this part of the Appeon Server Configuration 
Guide to work - to no avail:

Quote
Dynamic transaction object to connection cache mapping
Transaction object to connection cache mapping can be dynamically set up 
or changed by
setting or changing the DBMS and DBParm properties of the Transaction 
object in the
application source code.
To set or change the connection cache dynamically, code the DBParm 
property of the
Transaction object in this format:
SQLCA.DBParm=�CacheName='ASAConnectionCache1'�
End Quote

In spite of changing the CacheName property based on users' choice, the 
app always connects to the connection cache specified in my transaction 
object in Appeon Enterprise Manager.

I also enabled 'Dynamic Database Connection' on both connection caches 
but no dice.

Any help appreciated.

Daniel.





0
Daniel
1/4/2011 11:49:35 AM
sybase.appeon 804 articles. 0 followers. Follow

2 Replies
932 Views

Similar Articles

[PageSpeed] 38
Get it on Google Play
Get it on Apple App Store

Hi Daniel,

Let me explain Appeon database connection mechanism a little
bit. Unlike PowerBuilder's direct database connection,
Appeon uses connection cache to connect to the database.
Besides, you have to pre-configure database host and
database name and port that are used to connect to the
database.

SQLCA.DBMS = "SYC"  //This property corresponds to the
Connection Type of Connection Cache.
SQLCA.LogPass = "appeon" // This property corresponds to the
password of Connection Cache. And if you set dynamic
database connection of connection cache property is on in
the Appeon for .NET version, Appeon can support Logid and
logpass of transaction property. For example, sqlca.logid =
sle_1.text;  sqlca.logpass=sle_2.text.
SQLCA.LogId = "sa" // This property corresponds to the user
name of Connection Cache.
SQLCA.AutoCommit = False
SQLCA.DBParm = "rELEASE='12.5'"
SQLCA.DATABASE = ''
SQLCA.SERVERNAME= ''
// This property corresponds to the ODBC Data Source of
Connection Cache.

Connection Cache Name: 	appeonsample
  Connection Type: 	
  ODBC Data Source: 		
  Database Host: 	
  Database Port: 	
  Database Name: 	
  User Name: 	
  Password: 		

According to your settings, your configuration was right. So
could you provide AppeonServer.log and AppeonError.log.
Please clear the log files first, set the Log mode to Debug,
and then reproduce the issue on the Web.

Regards,
Steven
0
steven
1/5/2011 9:34:05 AM
Hi Steven,

Thank you for your reply. I am pretty busy with something else right now 
but as soon as I have a chance to get back to trying Appeon I'll post 
the log files (I just checked and both are blank!)

Regards,

Daniel.

On 05/01/2011 13:34, steven wrote:
> Hi Daniel,
>
> Let me explain Appeon database connection mechanism a little
> bit. Unlike PowerBuilder's direct database connection,
> Appeon uses connection cache to connect to the database.
> Besides, you have to pre-configure database host and
> database name and port that are used to connect to the
> database.
>
> SQLCA.DBMS = "SYC"  //This property corresponds to the
> Connection Type of Connection Cache.
> SQLCA.LogPass = "appeon" // This property corresponds to the
> password of Connection Cache. And if you set dynamic
> database connection of connection cache property is on in
> the Appeon for .NET version, Appeon can support Logid and
> logpass of transaction property. For example, sqlca.logid =
> sle_1.text;  sqlca.logpass=sle_2.text.
> SQLCA.LogId = "sa" // This property corresponds to the user
> name of Connection Cache.
> SQLCA.AutoCommit = False
> SQLCA.DBParm = "rELEASE='12.5'"
> SQLCA.DATABASE = ''
> SQLCA.SERVERNAME= ''
> // This property corresponds to the ODBC Data Source of
> Connection Cache.
>
> Connection Cache Name: 	appeonsample
>    Connection Type: 	
>    ODBC Data Source: 		
>    Database Host: 	
>    Database Port: 	
>    Database Name: 	
>    User Name: 	
>    Password: 		
>
> According to your settings, your configuration was right. So
> could you provide AppeonServer.log and AppeonError.log.
> Please clear the log files first, set the Log mode to Debug,
> and then reproduce the issue on the Web.
>
> Regards,
> Steven

0
Daniel
1/12/2011 7:05:37 AM
Reply:

Similar Artilces:

Dynamically Choose Database
I have to write a large data migration script to move data from one SQL Server database to another. Is there any way to dynamically specify the server and database name? I would like to do something like the following, (but this does not seem to work): Delete From [@ServerName].[@ImportToDatabase].[MyTable] Any help appreciated no. you can't do that. EXECUTE 'DELETE FROM [' + @ServerName + '].[' + @ImportToDatabase + '].[username].[MyTable]' Kay LeeMySpace.com - http://www.myspace.com/kragieInfrastructure GroupMySpace.com- Code to live, but Live to code. For some reason th...

Dynamically Conect to Different Database in a Database Server.
Hi All, Uses: ASP.NET 1.1, VB.NET 2003, MS SQL Server 2000. I've 2 databases with same structure namely DB01 & DB02 residing in the Same Database Server on Windows 2000 platform. What I need to do is on the login page to allow the user to select the database he needs to connect (To add a Dropdown box and let allow them to select). For that I created two items in Webconfig.config file as such: <appSettings> <add key="ConDB01" value="initial catalog=DB01;Password=XXX;User ID=ASPNET;data source=DBSVR"/> </appSettings>  -------------- and --------------- &...

Merging database results into other database results dynamically.
Hi, I am having problem coming up with a solution to a operation i want to perform in asp.net. Basically I have a application I am building which uses item data stored in a database and places that data a html template also stored in the database. The user logs in and creates an item in the database with Title, Description, dimensions, picture etc. Once they have created an item the can then select a html template (with the layout, look and feel they want), also stored in another table in the database with their user id, to create a web page (like a brochure). The item information needs t...

dynamically connect multiple databases to a database server
Our application uses embedded SQL to access databases. For v5.x, we dynamically connect multiple databases to a database server via dbclient.exe. We call ?db_string_connect (&sqlca,connect_str) ? for each database we want to connect to. We tried to do the same thing for v8.x, but failed to get a connection (SQLCODE -75) unless we start the server with all the databases we want to connect to and omit the DBF parameter from the connect_str. The connect_str we use is ?UID=dba;PWDsql;ENG=MyServer;Start=-x TCPIP; CON=sample;DBN=sample;DBF=c:\sample.db" As part of monthly up...

how to choose database?
Hello all, I am a brand new ASP.net user and am trying to learn from the starter kits. For the Time Tracker Kit, how does the program know to get data from a particular database? For example, if I wanted to change the database the program looks in, where would I have to look? Thanks. check web.config file. in which "ConnectionString" will be having some value like server="name"; database="name"; user="name";pwd="";Monu245http://www.codaddict.com - A new way to share/store/bookmark your code snippets...

Dynamic Database
 Is it possible to set up a dynamic database?  What I am after is setting up say a team, let the user pick the number of members (I wont know the number ahead of time), the page displays enough boxes to enter names (dynamic webpage), and the database creates enough places for the names. Well, table design is quite easy: TeamPlayers TeamID PlayerID Teams TeamID  TeamName Players PlayerID  PlayerName If the users types, say, 12 in the number of players, you can instantiate 12 textboxes in run-time. Or, which may be easier, you may know in advance, that 12 is the ma...

How to choose a database
Hi there, I'm using the Adaptive Server Anywhere for linux, and trying to get the included JDBC drivers to connect to the server. I can connect to the 'default' database no problem, presumably this is the first database loaded. However, I am unable to find *any* document what-so-flipping-ever about how to make the JDBC driver connect to a non-default database. I tried the most obvious and standard way of putting the database as a '/' part of the url, like this: jdbc:sybase:Tds:dev-db:2638/dev-db-1 but that didn't work. Any pointers? Please not...

How to do store the dynamical controls generated in database and retrieve them from database and show them on a form?
I have created some controls on a form.Like on a button click i have to generate a row consisting of a label and a textbox and on other button click i have to generate a row containing a label,a textbox and a dropdownlist.The user may click any button he wants.These rows must be added one byone on a panel.I want to store these controls in database and use them when required by retrieving them from database and showing them on a form.Code is appreciated. Below is the code how to do.Can u tell me how to do?protected void Button4_Click(object sender, EventArgs e) {Panel3.Visible = ...

Dynamic Database Connection?
Hi there, quite new to this really but i am sure that i saw somewhere that you could put someting in your web config file along with the database name and it would dynamically file the database for you! is this possible or was i dreaming this one up?   thanks  David Jenkins----------------http://www.1stmillion.co.uk/ - uk, ireland and netherlands opportunity. Dave, Open your web.config file and put the following rule in it; <add key="connStr" value="CONNECTIONSTRING"> Where CONNECTIONSTRING is your (duh) connectionstring for the database. In an ASPX codebehind-page ...

Dynamic database creation
Hi All, I have a web site where the user can select from a list of databases (they're actually all the same structure, but have data unique to each client). Each database is a SQL 2005 database held in the App_Data folder. This all works a treat. Each database is simply named after the client it is holding data for, and the connection string for each is stored in a database that is accessed However, what I need is a form where  a database name can be entered, and I can then create a new database with the same structure as the others - including tables, indexes and stored-procedur...

Dynamic Connection to Database
Dear All,   I have a problem within my project: I have to update different databases(but they merely uses the same Data) but they are located in different servers. I have three main tables: The Client table(ClientId, ClientName,CreationDate, EndDate,DbConnectionString,Createdby) and the two different clients tables to be updated(Cl_id,Cl_companyName,Cl_companyAddress,Cl_Manager,Cl_CreationDate,Cl_EndDate) So I have a Dropdownlist which is associated SQL statement that returns the ClientName as: select Clientname from clients where isnull(enddate); when selected that dropdown should...

Dynamically connecting to a database
Hi.  I've need to do something that has never even occured to me before: I need to write an application that can dynamically connect to any database within SQL Server (2000 or 2005)  Basically, we will have many instances of our application on the server, one for each client. They will all have their own databases. I've already written a sql script that returns a list of all the databases that belongs to our application. This, ofcause, implies that the procedure itself won't belong to any database in particular.  Is it possible to have a connectionstring th...

Creating a Dynamic Database
Hi, I'm trying to do something similar to ratemyprofessor.com ( http://www.ratemyprofessors.com/SelectSchool.jsp?country=0&stateselect=IL ) where you select a state, then a school, and then a teacher (and if the teacher doesn't exist the user can create a new one). My DataSource is a Microsoft Access Database with a list of schools by state.  Currently on my site, the user can select a state from a drop down list, and then all the schools for that state appear in a gridview below it.  How do I add another sub-directory in which the user can add teachers for each ...

How to dynamically connect to database?
I have a login dialog box where I want the user to type in their user id and password, which will then be used to connect to the database. The login screen is invoked by my main form, but how do I create the transaction object? Or is there another way to connect using the user's id and password? Driss. Answer 1: When I want to create an object on the fly, I first create a simple application and add the object at developement time. Then I, through the options/editor options tell Power* to show generated code. Then I look at the code it writes and I more or less copy it. A...

Web resources about - Dynamically choose database - sybase.appeon

Placebase team at Apple file “Schematic Maps” patent dynamically detailing important data
In a report from Computerworld way back in 2009, we learned that Apple had quietly acquired Maps API company Placebase. Then, founder of Placebase ...

Apple's Lightning port dynamically assigns pins to allow for reversible use
... a closer look at how Apple's new Lightning connector works, and has come to the conclusion that the 8 pins on each side of the plug are dynamically ...

In a dynamically typed language, is it a bad idea to return different data types?
In some cases, returning different types from a single function works.

Urlbox Launches Screenshots-as-a-Service Platform to Dynamically Update Galleries
... changes. Launched yesterday, Urlbox allows anyone with a gallery displaying website screenshots to automate the process and keep them dynamically ...

Everything.me launcher dynamically adapts to what you’re doing right now
... phone according to what you’re doing. Perform a search for ‘football’ and your background will change to the NFL logo. A launcher that dynamically ...


A YouTube Experiment Resizes the Player Dynamically
There's a new YouTube experiment that changes the video player's size, depending on the browser window's size. When resizing Chrome's window, ...

Apple Granted “Dynamically Changing Cursor for User Interface” Patent, Originally Filed in 2003
... a utility patent that covers the use of the mouse cursor that changes according to the context of the task it is engaged in. Called a “Dynamically ...

Atmel's FPSLIC II Dynamically Reconfigurable SoC Supports "Silicon-Sharing" For Peripherals & Interfaces ...
Silicon-Sharing Fits 200K Gate Design into 40K Gate FPSLIC II's, Cuts Power Drain by 97%

Everything.me Launcher Wants to Dynamically Change Phones Based on Location, Interests, and Mental State ...
What if your phone’s launcher dynamically changed based upon interests, your location, or topics you had in mind at a specific moment? A new ...

Resources last updated: 12/3/2015 7:06:41 AM