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) 

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

According to w3schools.com/ado/met_comm_createparameter.asp, to set the length for variable length data types, use the size parameter of the CreateParameter method.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.