×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Logging into Oracle

Logging into Oracle

Logging into Oracle

(OP)
Hi there:
I have a button on a form that interrogates an oracle database several times, in the form of queries. Each time I am required to log in manually.
Is there any way of writing code that logs the user in automatically?
I found this:
method pushButton(var eventInfo Event)
var
q Query
dbSQL Database
dynAlias DynArray[] AnyType
endvar
dynAlias["USER NAME"] = "*****"
dynAlias["Password"] = "*****"
dbSQL.open(" :Linux:",dynAlias)
q.readFromFile("Import ZZOSSUM2.qbe")
q.executeQBE()
etc
 where the **** represent the user name and password, but I still have to login.  The server is called Linux. This is Paradox 9 and Oracle 8.
Thanks in advance!

RE: Logging into Oracle

smartglass,

I'll hazard a guess that you need to be passing a string of the alias name to dbSQL.open.

ie ensure that you have a Paradox alias that points to the Linux server.

if Linux is the Paradox Alias then your command should be

dbSQL.open("Linux",dynAlias)

Let me know if you have any questions.

Regards

Bystander

PS hardcoding the username and password can be a severe security risk.  Logging in once may be the securer option.

RE: Logging into Oracle

(OP)
Thank you very much; it works perfectly now. We were logging in up to 9 times with each click - one for every query! I was curious when you suggested that logging in once may be securer...does this mean that I could have written it such that only the first login was required, then the password stored as an array for subsequent passes?
In any event we are only a small operation so security is less of a problem .
Thanks again

RE: Logging into Oracle

smartglass,

Glad to be of assistance.  About the logging on once, I am not sure but I think if you do the code below then you will be prompted to log in once but the database remains open for the rest of your session and all of your queries etc.

I hope it works.

Regards

Bystander
====================================================
method pushButton(var eventInfo Event)

var
q Query
dbSQL Database
endvar

dbSQL.open(":Linux:")
q.readFromFile("Import ZZOSSUM2.qbe")
q.executeQBE()
etc


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close