Solved

parameter syntax for a type TEXT column

Posted on 2013-01-08
2
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

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 33

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Microsoft SQL ADO Conn Issue 6 64
If condition on Html with Asp 11 49
Adding Row and Cell on a table 14 32
innerHTML 7 46
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 informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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