BethanyW 7/21/2010 9:43:24 AM

Procedure has too many arguments specified

I'm writing this to document an issue that I'm having recently with different VBA installs.

In upgrading code for several clients, and I've run into this problem twice now. The environments were varied, but let me detail what I know for sure. The issue involves a Dynamics GP 2010 VBA mod, an ADODB 2.8 connection using the Dynamics getUserInfo object. It actually has occurred on both GP10 and GP2010, the case that I'm detailing here is the latter.

The issue is that in some situations if when I code:

dim cmd as ADODB.command
'code here to get the connection using getUserInfo
cmd.activeConnection = cn
cmd.commandType = adStoredProc
cmd.commandText = "sp_myProc"

When the third line executes the command object does a 'refresh', it goes out and gets the parameters. Then when I (re)add the parameters, I have too many.

But this 'auto refresh' effect does not occur on all machines. In today's example, I'm using the SQL Server Nateive Client 10.0 on both boxes.

It does not happen on my dev box, Win 2008 Server, SQL 2008, but it does happen on the production client (Win 2003 server, SQL 2008 backend)

Any idea why the 'refresh' effect happens on some boxes, but not others?

 

Version: Unknown or N/A
Section: VBA


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3