[General connection using ODBC] [Microsoft] [SQL Server ODBC driver] COUNT field is incorrect or syntax error (SQL state: 07001; SQL code: 0)

ERROR on line 1:
ORA-28500: connecting from ORACLE to a non-Oracle system returned this message:
[Common use of ODBC connections] [Microsoft] [SQL Server ODBC driver]
COUNT field is invalid or syntax error
(SQL State: 07001; SQL code: 0) ORA-06512: on line 9

Does anyone know this error .. pls help us.

Thanks in advance.

+6
source share
2 answers

Since you are not providing any type of code where this error is generated from, I can only guess. After a Google query and found this , it looks like COUNT field incorrect or syntax error may mean that you are using the wrong number of parameters in your call,

If you posted the code from which the error occurred, this may help you understand what might go wrong.

+6
source

I just lost at least an hour + debugging my code to find out what the problem is. I used an ADODB connection in VBA with parameters. Apparently, if you don't have the Set keyword, the debug output will look as if the parameter has a value, but in fact it is missing. Of course, I knew that I needed Set , but it’s easy to notice when you try to detect a problem.

Problem:

  params(1) = cmd.CreateParameter("Email_ID", adInteger, adParamInput, , EmailID) 

Corrected Code:

  Set params(1) = cmd.CreateParameter("Email_ID", adInteger, adParamInput, , EmailID) 
+1
source

All Articles