I need to call an Oracle sequence from within my VB Code.
ODBC connection is used to connect to oracle database.
AFAIK the correct SQL Syntax for Oracle would be: (at least it works in sqlplus!)
"Caid" is nothing but a simple variable I use in vb codeCode:SELECT MY_COUNTER.NEXTVAL as caid FROM dual;
VB Code:
Dim CAID as String Dim sqlstring2 As String sqlstring2 = "SELECT CAID_COUNTER.NEXTVAL as caid FROM dual" Set rs2 = CurrentDb.OpenRecordset(sqlstring2)
produces an error:
"Error Code:3078
Error 3078 : The Microsoft Jet database engine cannot find the input table or query 'dual'. Make sure it exists and that its name is spelled correctly."
Anyone any idea how to get this sequence number via ODBC without VB or Oracle or Jet complaining?![]()
Thx in advance
MIKQ



Reply With Quote
