Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging into Oracle 1

Status
Not open for further replies.

smartglass

IS-IT--Management
Mar 14, 2006
33
GB
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!

 
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.

 
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
 
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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top