Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

parameter syntax for a type TEXT column

Posted on 2013-01-08
2
Medium Priority
?
317 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 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 1500 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 34

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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/…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

877 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