HartleySan Posted May 16, 2012 Share Posted May 16, 2012 I'm wondering what data types can be used for parameters in stored procedures. I ask because the examples in the book and the examples I've seen online always declare parameters of the type INT or VARCHAR. Is it possible to have parameters of the type TEXT? I have a large string of data that I want to place in the DB with a stored procedure, but when I try to make the parameter of type TEXT, the call to the stored procedure fails. However, if I change the type of the parameter to VARCHAR with some ridiculously large character limit (e.g., VARCHAR(5000)), then the stored procedure works. Why is that? Is there something I'm unaware of with stored procedures in MySQL? Please note that I'm using the latest version of XAMPP. Thanks. Link to comment Share on other sites More sharing options...
HartleySan Posted May 16, 2012 Author Share Posted May 16, 2012 Nevermind, please ignore this topic. For some inexplicable reason, when I changed VARCHAR back to TEXT and re-created the procedure, it worked fine. I have absolutely no clue why it works now. Sorry for the trouble, all. Link to comment Share on other sites More sharing options...
Larry Posted May 16, 2012 Share Posted May 16, 2012 Not sure if I ever made this clear or not, but computers are a total pain. Link to comment Share on other sites More sharing options...
HartleySan Posted May 16, 2012 Author Share Posted May 16, 2012 Yeah, it's the most bizarre thing, as I gave up on the script when it wasn't working and went to bed, and then the next day, the only thing I did was delete the stored procedure and remake the same exact one. Obviously, that made the difference, but no clue why. Oh well. All's well that ends well. Link to comment Share on other sites More sharing options...
Recommended Posts