Solved

parameter syntax for a type TEXT column

Posted on 2013-01-08
2
302 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

919 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

18 Experts available now in Live!

Get 1:1 Help Now