0

I'm getting this error:

  code  : ORA-00000
  msg   : The statement is not scrollable

This is the code:

  char query[] ="select max(VQC_ID) from vqc";
  OCI_Statement* st;
  st = OCI_StatementCreate(cn);
  OCI_ExecuteStmt(st, query);
  OCI_Resultset* rs;
  rs = OCI_GetResultset(st);
  OCI_FetchFirst(rs);
  printf("%i \n", OCI_GetInt(rs, 1));
  return  OCI_GetInt(rs, 1);

1 Answer 1

2

Read ocilib documentation and you will have the answer.... You need to declare the statement 'scrollable' in order to use OCI_FetchFirst. If you just want to fetch only one value, use OCI_FetchNext

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.