Jason
On 1 Sep 2004 15:05:00 -0700, Jason Vogel <jasonvogel@poboxes_dot_com>
wrote:
Bruce Armstrong [TeamSybase]
http://www.teamsybase.com
TeamSybase blogs:
http://www.teamsybase.net/blogs
Vote for PocketBuilder in the Mobile Village awards
http://www.mobilevillage.com/awards.htm
Two 3rd party books on developing with PowerBuilder
http://www.pb9books.com?source=newsgroups
Need code sample? Check out CodeXchange:
http://www.codexchange.sybase.com
Preach the gospel at all times. If necessary, use words. - Francis of Assisi
http://www.needhim.org
---------------------------------------------------------------------
DISCLAIMER:
This newsgroup message is only intended for the recipient. Given that it
is a posting to a public newsgroup, that means if you can read this
message then you are the recipient. This message may contain information
that is confidential and protected from disclosure. And then again,
it may not.
Given that TeamSybase members are not employees of Sybase, the contents
of this message do not necessarily represent the views or policies of
Sybase. Given that TeamSybase is a diverse group of users of Sybase
products, the contents of this message do not necessarily represent the
views of a significant number of the members of TeamSybase. Given that the
author has multiple personalities and hears voices in his head, the contents
of this message do not necessarily represent his own views.
Okay, so now I have
DB : Oracle 9.2.0.5
PB : 9.0.1, Build 7236
DbParm=DisableBind=1 StaticBind=1 PWDialog=1 PWExpDialog=1
...no change.
Here is my ini file,
;-------------------------------------------------------------------------------------
; Sales Entry
;-------------------------------------------------------------------------------------
[Database SE]
AutomaticDevelopmentLoginUserID=secure_test
DBMS=O90 ORACLE v9.0
ServerName=Sun3500
DbParm=DisableBind=1 StaticBind=1 PWDialog=1 PWExpDialog=1
Prompt=0
Here is my code (pfc_logon in my AppManager),
// Populate SQLCA using current application INI file settings.
SQLCA.DBMS = ProfileString(is_appinifile,is_iniparagraph,"dbms", "")
SQLCA.Database = ProfileString(is_appinifile,is_iniparagraph,"database", "")
SQLCA.ServerName = ProfileString(is_appinifile,is_iniparagraph,"servername","")
SQLCA.DBParm = ProfileString(is_appinifile,is_iniparagraph,"dbparm", "")
// Populate SQLCA using the specified userid and password.
SQLCA.UserID = as_userid
SQLCA.DBPass = as_password
SQLCA.LogID = as_userid
SQLCA.LogPass = as_password
try
// Save user name for later use
is_username = Upper(as_userid)
// Connect...
CONNECT USING SQLCA;
// Check to see if an error occurred trying to logon.
If (SQLCA.SQLCode <> 0) Then
MessageBox("Logon",&
"Logon Failed. Error Code: " + String(SQLCA.SQLDBCode) + &
"~nReason: " + SQLCA.SQLErrText, Exclamation!)
Return FAILURE
End If
If (SQLCA.of_isConnected() = TRUE) Then
// Determine how many days until the Password expires
SELECT
ACCOUNT_STATUS,
TRUNC(TRUNC(EXPIRY_DATE) - TRUNC(SYSDATE))
INTO
:ls_status,
:li_days_till_expiration
FROM
SYS.USER_USERS
WHERE
USERNAME = USER;
Choose Case Upper(ls_status)
Case 'OPEN','EXPIRED(GRACE)'
// Prompt for a Password change when within 14 days of Expiration (per Todd
Moen 08/20/2004)
If (li_days_till_expiration > 0) and (li_days_till_expiration <= 14) Then
li_return_code = MessageBox("Warning","Your password will expire in
"+String(li_days_till_expiration)+" day(s)~r~n"+ &
"Would you like to change your password?",Exclamation!,YesNo!)
// 1 => ChangePassword...
If (li_return_code = 1) Then
li_return_code = OpenWithParm(w_ahs_change_password,is_username)
End If
End If
End Choose
End If
catch ( Exception e )
MessageBox("Connect Exception",e.Text)
end try
End If
If (IsValid(SQLCA) = TRUE) Then
If (SQLCA.of_isConnected() = TRUE) Then
// Clear any pre-existing Database Roles
This.is_role = C_EMPTY_STRING_ARRAY[]
// Check to see if the user has the authority to use the specified program
//
// DevNote : Return the RC coming from of_activateRoles() - !! Don't convert
to simple FAILURE RC
li_return_code = This.of_activateroles()
If (li_return_code <= FAILURE) Then
Return li_return_code
End If
End If
//is_username = as_userid
//is_oracleusername = as_userid
This.Event POST ue_post_pfc_logon()
Else
MessageBox("Error","CONNECT USING SQLCA failed - Unable to
connect~r~n~r~nInvalid(SQLCA)")
Return FAILURE
End If
Return SUCCESS
Any ideas?
Jason
DbParm=DisableBind=1,StaticBind=1,PWDialog=1,PWExpDialog=1
Without the commas, PB probably doesn't recognize what you're passing
as seperate paramenters. Look at the preview tab of the database
connection in the IDE to see what you should be ending up with.
On 2 Sep 2004 09:27:01 -0700, Jason Vogel <jasonvogel@poboxes_dot_com>
wrote:
TeamSybase blogs:
http://www.teamsybase.net/blogs