



































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




































Call-Level Interface Java Database Connectivity PHP
4
Name:
Password:
Your account number is 1234-
gates’ --
who cares?
Comment in Oracle
SELECT acct FROM Accounts
WHERE name = ’gates’ --’ AND
passwd = ’who cares?’
5
All treated as a comment
10
Environment Connection
Statement
SQLAllocHandle(SQL_HANDLE_STMT,
myCon, &myStat);
handle.
that will be created.
SQLPrepare(myStat, ”SELECT beer, price FROM Sells WHERE bar = ’Joe’’s Bar’”, SQL_NTS);
SQLExecute(myStat);
16
This constant says the second argument is a “null-terminated string”; i.e., figure out the length by counting characters.
SQLExecuteDirect(H,S,L);
SELECT beer, price FROM Sells
WHERE bar = ’Joe’’s Bar’
SQLBindCol(myStat, 1, , &theBeer, , );
SQLBindCol(myStat, 2, , &thePrice, , );