2

I have some fields in a SQL table which are type decimal(x,y). In the VBA how do I represent these in the ADO parameters for a stored procedure argument? For example, a varchar would be declared using adVarChar:

Set prm = cmd.CreateParameter("@ColumnX", adVarChar, adParamInput, 50)
intrigued_66
  • 16,082
  • 51
  • 118
  • 189

1 Answers1

3

Have a look at this page:

The two data types you may be interested in are adDecimal and adNumeric. The following post describes the difference between the two:

Here is an example: http://www.access-programmers.co.uk/forums/showthread.php?t=149631

Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93
w0051977
  • 15,099
  • 32
  • 152
  • 329
  • According to http://www.w3schools.com/ado/met_comm_createparameter.asp, to set the length for variable length data types, use the size parameter of the CreateParameter method. – PowerUser Nov 28 '12 at 16:32