×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

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!

*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

Unlock oracle user account

Unlock oracle user account

Unlock oracle user account

(OP)
Dear all,
I am trying to create an utility inside the clarion app, the utility can unlock oracle user account. Currently I am doing that within sqlplus.
Any idea? Thanks in advance.

Kind regards
cy  

RE: Unlock oracle user account

Hi!

Use a Dummy table and send the SQL statement via a PROP:SQL to the Oracle Server.

Which version of Clarion are you using?

Regards
 

RE: Unlock oracle user account

(OP)
Hi ShankarJ,
I'm using c6.3, so I can send eg "ALTER USER SCOTT ACCOUNT UNLOCK" via PROP:SQL, right?
Thanks.

Kind regards
cy

RE: Unlock oracle user account

Hi!

Exactly. Since you are using Clarion 6.3, you can take benefit of the TURBOSQL driver string for your dummy table. An example is shown below ::

CODE

DummyTable                   FILE,DRIVER('ODBC', '/TURBOSQL = TRUE'),OWNER(MyOdbcConnectString),PRE(DUM),BINDABLE,THREAD
Record                         RECORD,PRE()
DummyDate                        STRING(8)
DummyDate_GRP                    GROUP,OVER(BUSINESS_DATE)
DummyDate_DT                       DATE
DummyDate_TM                       TIME
                                 END
DummyNumber                      REAL
DummyString                      CSTRING(21)
                               END
                             END

  CLOSE(DummyTable)
  OPEN(DummyTable)
  IF ERRORCODE()
     MESSAGE(CLIP(ERRORFILE()) & ' : ' & ERROR() & ' [' & ERRORCODE() & ']|' & 'File Error : ' & FILEERROR() & ' [' & FILEERRORCODE() & ']','E R R O R - OPENSQL()')
     RETURN
  END

  DummyTable{PROP:SQL} = 'ALTER USER SCOTT ACCOUNT UNLOCK'

  IF ERRORCODE()
     MESSAGE(CLIP(ERRORFILE()) & ' : ' & ERROR() & ' [' & ERRORCODE() & ']|' & 'File Error : ' & FILEERROR() & ' [' & FILEERRORCODE() & ']','E R R O R - PROP:SQL')
  ELSE
!    .... In case your query returns a result set, LOOP through rows as shown below and if not nothing ....
     Row# = 0
     LOOP
        NEXT(DummyTable)

        IF ERRORCODE() THEN BREAK.

        Row# += 1
     END
  END

  CLOSE(DummyTable)

Regards
 

RE: Unlock oracle user account

Hi!

Should be ::

CODE

DummyDate                        STRING(8)
DummyDate_GRP                    GROUP,OVER(DummyDate)
DummyDate_DT                       DATE
DummyDate_TM                       TIME
                                 END

I have just defined some dummy columns but you would normally define the columns based on the result set.

Regards
 

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