Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Existing project that has a column defined as TEXT type in SQL2005. Going to convert it over to VARCHAR(MAX) in the backend. None of that's an issue. But in the ADP front end, where I'm passing parameters to and from procedures, I'm not sure what to use. Currently, I have:

cmd.Parameters.Append cmd.CreateParameter("@BigVariable", adLongVarChar, adParamInput, -1, "sample text")


The above has been working fine for several years.

I tried using the same code in a test proc and it seems to work but when i try to return a varchar(max) param I get an error that the parameter is not properly defined. I ran code on the proc from the adp to see what the param values were and the "type" is 200 and the "size" is 2147483647. I tried using those values instead of adLongVarChar and -1 and got the same error that it's not defined right.

Interestingly, adLongVarChar is 201 but that doesn't really explain anything.

Can anyone tell me definitively what the param type is for varchar(max) and the size for either input or output params?

thanks,

Keith
Posted
Updated 23-Mar-12 10:10am
v2

1 solution

Hi,
In sql every datatype has individual datatype in MSACCESS VBA


http://www.w3schools.com/ado/ado_datatypes.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900