Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6553889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:38:04+00:00 2026-05-25T12:38:04+00:00

I am using PowerBuilder PFC library to login to the database. n_cst_appmanager/ pfc_open: IF

  • 0

I am using PowerBuilder PFC library to login to the database.

n_cst_appmanager/ pfc_open:

IF this.of_LogonDlg() > 0 THEN
    Open(w_myapp_frame)
END IF

n_cst_appmanager/ pfc_logon:

SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=mytestdb;UID=" + as_userid + ";PWD=" + as_password + "'"
connect using SQLCA;

Now, once the user is logged in, there are few situations that I will need to connect to another database (for example, to copy some data there), so I would like to connect to the other database automatically, without displaying the login window again, therefore I would need to save the username and password of the user.
How can I save it? Do I need to save in the registry? Can you give some example please?

For example, I can get the user id in following way:

s_userid = gnv_app.of_GetUserID()

But I can not get the password. Can someone please help me how i can do it? Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:38:05+00:00Added an answer on May 25, 2026 at 12:38 pm

    Actually, now that I’m paying attention to what you need instead of what you asked for <g>, and riffing off of Hugh’s answer, why not just copy the transaction object?

    n_cst_String lnv_String
    
    ltr_NewConnect.DBMS = SQLCA.DBMS
    ltr_NewConnect.AutoCommit = SQLCA.AutoCommit
    ltr_NewConnect.DBParm = lnv_String.of_GlobalReplace (SQLCA.DBParm, "mytestdb", "myotherdb")
    

    If I were doing this, I’d code a copy of all the transaction object fields, just in case the means of defining the connection changes.

    I’m assuming the other database is the same type of database in order for this to make sense (so that it uses the same type of DBParm), but either way the principle may apply.

    Good luck,

    Terry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a tree datawindow in powerbuilder. This repesents a mixture of tree
How to connect the database using Middleware NxTera in PowerBuilder?
Setup : Using PowerBuilder 6.5. I have a composite report (with a report header)
Using the following as an example (with $db being a previously created database connection
Using jQuery, how do I get the value from a textbox and then load
I developed a web site using Sybase PowerBuilder V12.0 Classic and the output is
We are using MS Office 2010 with PowerBuilder 10.5. While using mail merge functionality
I am using PowerBuilder 12 for one of the application. I have deployed the
using the jquery ui modal dialog , the background shades grey (i assuming this
Using Ivy with this Ant target: <target name=retrieve-jars> <ivy:retrieve pattern=WebContent/WEB-INF/lib/[artifact].[ext] /> </target> to fetch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.