Solved

parameter syntax for a type TEXT column

Posted on 2013-01-08
2
300 Views
Last Modified: 2013-01-08
I'm currently using parameterized queries in my code and am looking for assistance on how to create one a type TEXT column in a sql server database. Right now I have:

.Parameters.Append  .CreateParameter( "newsletter", adLongVarChar, adParamInput, , newsletter )

adLongVarChar is defined in my adovbs.inc file, and I'm certain this parameter is giving me problems as my query works if I don't include it.

Any assistance is greatly appreciated!
Josh
0
Comment
Question by:Big Monty
2 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 38755287
It might be that extra comma you have

.Parameters.Append  .CreateParameter( "newsletter", adLongVarChar, adParamInput, 50,newsletter )

instead of

.Parameters.Append  .CreateParameter( "newsletter", adLongVarChar, adParamInput, , newsletter )

the 50 can be any number that is the length of the field.
0
 
LVL 32

Author Comment

by:Big Monty
ID: 38755588
I just tried it with the size and it didn't save properly. It didnt give me an error, it just didnt save the data. I then made sure the data was posting properly and to my surprise, it wasn't :) I got that fixed and everythig seems to be working.

Will award you the points since even though it is an optional parameter, something needs to be there for the syntax to be correct.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now