We can call stored procedures from E1 using C BSFN.
Use the below Syntax and create your C BSFN.
/* Allocate Environment Handle */
retCode =3D SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &myEnvnHndl);
/* Set the ODBC version */
if (retCode =3D=3D SQL_SUCCESS)
retCode =3D SQLSetEnvAttr(myEnvnHndl, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)
SQL_OV_ODBC3, SQL_IS_UINTEGER);
/* Allocate Connection Handle */
if (retCode =3D=3D SQL_SUCCESS)
retCode =3D SQLAllocHandle(SQL_HANDLE_DBC, myEnvnHndl, &myConnHndl);
if (retCode =3D=3D SQL_SUCCESS)
{
/* Connect to ODBC Database */
/* retCode =3D SQLConnectW(myConnHndl, dnsName, SQL_NTS, dnsUser,
SQL_NTS, dnsPswd, SQL_NTS); */
retCode =3D SQLDriverConnectW(myConnHndl,
NULL,
szDnsName,
SQL_MAX_OPTION_STRING_LENGTH,
NULL,
SQL_NTS,
0,
SQL_DRIVER_NOPROMPT);
/* Allocate SQL Statement Handle */
retCode =3D SQLAllocHandle(SQL_HANDLE_STMT, myConnHndl,
&myStmtHndl);
if (retCode =3D=3D SQL_SUCCESS)
{
/* SQL Query */
retCode =3D SQLPrepare(myStmtHndl, lpDS->szSQLQuery, SQL_NTS);
/* Specify address of variable to hold the number of rows fetched
retCode =3D SQLSetStmtAttr(myStmtHndl, SQL_ATTR_ROWS_FETCHED_PTR,
if (retCode =3D=3D SQL_SUCCESS)
{
/* Execute Query */
retCode =3D SQLExecute(myStmtHndl);
}
}
}
Assuming your database is SQL.
Gopal.