Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Identification Division.
- Program-id. CursorTest.
- Environment Division.
- Input-output Section.
- Data Division.
- Working-storage Section.
- * vul hier een email adres in
- 01 email pic x(30) value "persoon@mail.com".
- 02 wachtwoord pic x(30).
- 01 sqlcode pic s9(3).
- 88 sql-ok value zeroes.
- 01 sqlselect pic s9(3).
- 88 sqlselect-zeroes value zeroes.
- 01 einde pic x.
- Procedure Division.
- pgm.
- display "single row select wordt getest"
- perform do-connect
- perform read-locatie
- move sqlcode to sqlselect
- perform do-disconnect
- if sqlselect-zeroes
- display "single row select geslaagd"
- display wachtwoord
- end-if
- if sqlselect <> 0
- display "ongeldige persoon"
- end-if
- accept einde
- stop run.
- do-connect.
- exec sql
- connect to "jdbc:mysql://localhost/dbJoke"
- user "iceholes"
- using "iceholes"
- driver "com.mysql.jdbc.Driver"
- end-exec.
- do-disconnect.
- exec sql disconnect end-exec.
- read-locatie.
- exec sql
- SELECT wachtwoord INTO :wachtwoord
- FROM Persoon
- WHERE email = :email
- end-exec.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement