This is a discussion on Regarding Pro*c within the Oracle Tutorials forums, part of the Articles and Tutorials category; What is the process to run a c program for database connectivity using Pro*C?...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
well
your ques is not clear....However u can write different function for logging in main { //declare and allocate the context //call logon(ctx,username,passwd,connstr); } int logon(sql_ctx ctx,char username[],char passwrd[],char conn_str[]) { EXEC SQL CONTEXT USE :ctx; //copy username passwd and conn_str in oracle variables uid,passwd and connstring EXEC SQL CONNECT :uid IDENTIFIED BY asswd USING :connstring; //Handle the errors return 1; } |