I’m using Classic ASP/MySQL to insert a long user input in to my database, generated from a rich text editor. The column is set to LONG-TEXT.
Being new to parameterized queries (prepared statements), I am not sure of the data length to use for this particular query.
This is my ‘Add Parameter’ statement for a simple VARCHAR query:
Const ad_varChar = 200
Const ad_ParamInput = 1
Set newParameter = cmdConn.CreateParameter("@firstName", ad_varChar, ad_ParamInput, 50, firstName)
cmdConn.Parameters.Append newParameter
As you can see, I used the value 50 for the data length. What do I use for a long-text column, where the users data length is unknown? It could be 50, or it could be 8000!
Use length of itself?