Re: Updating SQL Text fields using ADO in ASP



Thank you, Andrew.
I'll give that a try first thing Monday.

Regards,

Rod

"Andrew D. Newbould" wrote:

> In message <4FDB8761-A857-4A8A-BCE8-03D6A9EF2802@xxxxxxxxxxxxx>, tuuky
> <tuuky@xxxxxxxxxxxxxxxxxxxxxxxxx> writes
> >I am trying to use a parameter list to insert and update a Text field
> >(datatype text) in a SQL table through a stored procedure.
> >
> >The asp form contains a text box that posts back to the page.
> >
> >.Parameter.Append .CreateParameter("@news_text", [text type here], newsText)
> >
> >First, I can't seem to find the constant value for such data type.
> >I tried using a adLongVarChar, but I received a conversion error.
> >
> >Any help would be appreciated.
>
> adLongVarChar is correct for an SQL Server TEXT field and adLongVarWChar
> for NTEXT fields.
>
> Your CreateParameter is however wrong. The syntax is:
>
> CreateParameter([Name], [Type], [Direction], [Size], [Value])
>
> If you do not wish to specify a particular parameter then you MUST still
> provide the Comma. In addition, ASP variables are typeless and therefore
> you are actually passing a Variant yet telling ADO (and therefore SQL)
> its a String. To be safe you really must get into the habit of casting
> your variables properly in ASP. Therefore you line should read:
>
> ..CreateParameter("@news_text", adLongVarChar, , , CStr(newsText))
>
> Kind Regards,
>
> --
> Andrew D. Newbould E-Mail: newsgroups@xxxxxxxxxxxxxxxxx
>
> ZAD Software Systems Web : www.zadsoft.com
>
.



Relevant Pages

  • Re: Terminal services and login interactively policy
    ... Regards ... Andrew ... > Log in to your ts with administrative rights. ...
    (microsoft.public.windows.server.sbs)
  • Re: Firewall client icon not visible
    ... > Hello Andrew ... > Thank you for posting to the SBS Newsgroup. ... > Best regards, ...
    (microsoft.public.windows.server.sbs)
  • Re: Sum Activecell Offset Problem
    ... Regards ... Bob ... The problem is that there could be more than one entry per ... >>> Andrew ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Rainy Sunday Eve. Smoke
    ... Good Evening, Andrew and ASP. ... I'm smoking Lagniappe in my Comoy bulldog. ... It's a word we use, here in Louisiana, for a little something extra. ... Like several others here on ASP, I mix these together and see what I get! ...
    (alt.smokers.pipes)
  • Re: Session Lost
    ... >> asp.net application this loses the asp session. ... >> check the antivirus tool, but this tool doesn't uses any application ... >> Server, IIS 6.0, SQL Server 2000 and our application uses activex ... >> Regards, ...
    (microsoft.public.dotnet.framework.aspnet)