Francisco Morosini wrote:
how i can pass a variable to query?

like:

select * from users where user.cid=?vp_userid

where vp_userid can be a variable
Is this using stored procedures, ODBC or JDBC?

For JDBC or ODBC you use the "?" character and then use one of the PreparedStatement.setXXX methods (JDBC) or the SQLBindParameter function (ODBC).

For stored procedures you use the ":" character followed by the variable name. The reference documentation for CREATE DBPROC has an execellent example:

http://www.sapdb.org/htmhelp/a7/41ee11605911d3a98800a0c9449261/content.htm

Hope this helps.



_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to