Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

parameter syntax for a type TEXT column

Posted on 2013-01-08
2
Medium Priority
?
315 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 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 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

662 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