The precision is invalid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shank

    The precision is invalid

    Using Dreamweaver, I'm trying to update a table using a stored procedure.
    I'm getting the following error. The line# reference is on the last line:
    rsUpdate.Execut e(). That doesn't help much, but I'm sure the problem must be
    with the number fields: Royalty (money) or Ownership (float). How do I
    change the precision to match the table? In this line: "@Royalty", 6,
    1,8,varRoyalty, what does 6,1,8 represent. Where can I find a
    crossreference? I believe 6 is datatype money, 8 is size in bytes. What is
    1...?
    thanks

    Microsoft OLE DB Provider for SQL Server error '80004005'
    The precision is invalid.

    <%
    set rsUpdate = Server.CreateOb ject("ADODB.Com mand")
    rsUpdate.Active Connection = ConnString
    rsUpdate.Comman dText = "stp_Publisher_ Update"
    rsUpdate.Comman dType = 4
    rsUpdate.Comman dTimeout = 0
    rsUpdate.Prepar ed = true
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Tit le", 200,
    1,255,varTitle)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Art ist", 200,
    1,255,varArtist )
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen der", 200,
    1,1,varGender)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen re", 200,
    1,50,varGenre)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Voc alRange", 200,
    1,20,varVocalRa nge)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gro upLevel", 200,
    1,20,varGroupLe vel)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Yea rReleased", 200,
    1,4,varYearRele ased)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Age nt", 200,
    1,50,varAgent)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Pub lisher", 200,
    1,50,varPublish er)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
    1,8,varRoyalty)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own er", 200,
    1,50,varOwner)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own ership", 131,
    1,9,varOwnershi p)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Wri ters", 200,
    1,255,varWriter s)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Com ments", 200,
    1,8000,varComme nts)
    rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@ID" , 131, 1,9,varID)
    rsUpdate.Execut e()
    %>


  • Thomas Dodds

    #2
    Re: The precision is invalid




    "shank" <shank@tampabay .rr.com> wrote in message
    news:eEEPdQFkEH A.3712@TK2MSFTN GP15.phx.gbl...[color=blue]
    > Using Dreamweaver, I'm trying to update a table using a stored procedure.
    > I'm getting the following error. The line# reference is on the last line:
    > rsUpdate.Execut e(). That doesn't help much, but I'm sure the problem must
    > be
    > with the number fields: Royalty (money) or Ownership (float). How do I
    > change the precision to match the table? In this line: "@Royalty", 6,
    > 1,8,varRoyalty, what does 6,1,8 represent. Where can I find a
    > crossreference? I believe 6 is datatype money, 8 is size in bytes. What is
    > 1...?
    > thanks
    >
    > Microsoft OLE DB Provider for SQL Server error '80004005'
    > The precision is invalid.
    >
    > <%
    > set rsUpdate = Server.CreateOb ject("ADODB.Com mand")
    > rsUpdate.Active Connection = ConnString
    > rsUpdate.Comman dText = "stp_Publisher_ Update"
    > rsUpdate.Comman dType = 4
    > rsUpdate.Comman dTimeout = 0
    > rsUpdate.Prepar ed = true
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Tit le", 200,
    > 1,255,varTitle)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Art ist", 200,
    > 1,255,varArtist )
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen der", 200,
    > 1,1,varGender)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen re", 200,
    > 1,50,varGenre)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Voc alRange", 200,
    > 1,20,varVocalRa nge)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gro upLevel", 200,
    > 1,20,varGroupLe vel)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Yea rReleased", 200,
    > 1,4,varYearRele ased)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Age nt", 200,
    > 1,50,varAgent)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Pub lisher", 200,
    > 1,50,varPublish er)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
    > 1,8,varRoyalty)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own er", 200,
    > 1,50,varOwner)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own ership", 131,
    > 1,9,varOwnershi p)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Wri ters", 200,
    > 1,255,varWriter s)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Com ments", 200,
    > 1,8000,varComme nts)
    > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@ID" , 131, 1,9,varID)
    > rsUpdate.Execut e()
    > %>
    >
    >[/color]


    Comment

    • shank

      #3
      Re: The precision is invalid

      Thanks, but I still don't see how to set the Precision property.
      I don't see anything that relates to:
      rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
      1,8,varRoyalty)

      "Thomas Dodds" <thomasdodds@ho tmail.com> wrote in message
      news:utxAiVFkEH A.1348@TK2MSFTN GP15.phx.gbl...[color=blue]
      >[/color]
      http://msdn.microsoft.com/library/de...reateparam.asp[color=blue]
      >
      >
      > "shank" <shank@tampabay .rr.com> wrote in message
      > news:eEEPdQFkEH A.3712@TK2MSFTN GP15.phx.gbl...[color=green]
      > > Using Dreamweaver, I'm trying to update a table using a stored[/color][/color]
      procedure.[color=blue][color=green]
      > > I'm getting the following error. The line# reference is on the last[/color][/color]
      line:[color=blue][color=green]
      > > rsUpdate.Execut e(). That doesn't help much, but I'm sure the problem[/color][/color]
      must[color=blue][color=green]
      > > be
      > > with the number fields: Royalty (money) or Ownership (float). How do I
      > > change the precision to match the table? In this line: "@Royalty", 6,
      > > 1,8,varRoyalty, what does 6,1,8 represent. Where can I find a
      > > crossreference? I believe 6 is datatype money, 8 is size in bytes. What[/color][/color]
      is[color=blue][color=green]
      > > 1...?
      > > thanks
      > >
      > > Microsoft OLE DB Provider for SQL Server error '80004005'
      > > The precision is invalid.
      > >
      > > <%
      > > set rsUpdate = Server.CreateOb ject("ADODB.Com mand")
      > > rsUpdate.Active Connection = ConnString
      > > rsUpdate.Comman dText = "stp_Publisher_ Update"
      > > rsUpdate.Comman dType = 4
      > > rsUpdate.Comman dTimeout = 0
      > > rsUpdate.Prepar ed = true
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Tit le", 200,
      > > 1,255,varTitle)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Art ist", 200,
      > > 1,255,varArtist )
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen der", 200,
      > > 1,1,varGender)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen re", 200,
      > > 1,50,varGenre)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Voc alRange", 200,
      > > 1,20,varVocalRa nge)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gro upLevel", 200,
      > > 1,20,varGroupLe vel)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Yea rReleased",[/color][/color]
      200,[color=blue][color=green]
      > > 1,4,varYearRele ased)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Age nt", 200,
      > > 1,50,varAgent)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Pub lisher", 200,
      > > 1,50,varPublish er)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
      > > 1,8,varRoyalty)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own er", 200,
      > > 1,50,varOwner)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own ership", 131,
      > > 1,9,varOwnershi p)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Wri ters", 200,
      > > 1,255,varWriter s)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Com ments", 200,
      > > 1,8000,varComme nts)
      > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@ID" , 131,[/color][/color]
      1,9,varID)[color=blue][color=green]
      > > rsUpdate.Execut e()
      > > %>
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Bob Barrows [MVP]

        #4
        Re: The precision is invalid

        It needs to be set AFTER the Parameter is created:

        Set param = rsUpdate.Create Parameter("@Roy alty", 6,1)
        param.precision = whatever
        param.numericsc ale=whatever
        param.value = varRoyalty
        rsUpdate.Parame ters.Append param

        Bob Barrows

        shank wrote:[color=blue]
        > Thanks, but I still don't see how to set the Precision property.
        > I don't see anything that relates to:
        > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
        > 1,8,varRoyalty)
        >
        > "Thomas Dodds" <thomasdodds@ho tmail.com> wrote in message
        > news:utxAiVFkEH A.1348@TK2MSFTN GP15.phx.gbl...[color=green]
        >>[/color]
        >[/color]
        http://msdn.microsoft.com/library/de...reateparam.asp[color=blue][color=green]
        >>
        >>
        >> "shank" <shank@tampabay .rr.com> wrote in message
        >> news:eEEPdQFkEH A.3712@TK2MSFTN GP15.phx.gbl...[color=darkred]
        >>> Using Dreamweaver, I'm trying to update a table using a stored[/color][/color]
        > procedure.[color=green][color=darkred]
        >>> I'm getting the following error. The line# reference is on the last[/color][/color]
        > line:[color=green][color=darkred]
        >>> rsUpdate.Execut e(). That doesn't help much, but I'm sure the problem[/color][/color]
        > must[color=green][color=darkred]
        >>> be
        >>> with the number fields: Royalty (money) or Ownership (float). How
        >>> do I
        >>> change the precision to match the table? In this line: "@Royalty",
        >>> 6, 1,8,varRoyalty, what does 6,1,8 represent. Where can I find a
        >>> crossreference? I believe 6 is datatype money, 8 is size in bytes.
        >>> What[/color][/color]
        > is[color=green][color=darkred]
        >>> 1...?
        >>> thanks
        >>>
        >>> Microsoft OLE DB Provider for SQL Server error '80004005'
        >>> The precision is invalid.
        >>>
        >>> <%
        >>> set rsUpdate = Server.CreateOb ject("ADODB.Com mand")
        >>> rsUpdate.Active Connection = ConnString
        >>> rsUpdate.Comman dText = "stp_Publisher_ Update"
        >>> rsUpdate.Comman dType = 4
        >>> rsUpdate.Comman dTimeout = 0
        >>> rsUpdate.Prepar ed = true
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Tit le", 200,
        >>> 1,255,varTitle)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Art ist", 200,
        >>> 1,255,varArtist )
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen der", 200,
        >>> 1,1,varGender)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen re", 200,
        >>> 1,50,varGenre)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Voc alRange",
        >>> 200, 1,20,varVocalRa nge)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gro upLevel",
        >>> 200, 1,20,varGroupLe vel)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Yea rReleased",[/color][/color]
        > 200,[color=green][color=darkred]
        >>> 1,4,varYearRele ased)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Age nt", 200,
        >>> 1,50,varAgent)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Pub lisher",
        >>> 200, 1,50,varPublish er)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
        >>> 1,8,varRoyalty)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own er", 200,
        >>> 1,50,varOwner)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own ership",
        >>> 131, 1,9,varOwnershi p)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Wri ters", 200,
        >>> 1,255,varWriter s)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Com ments",
        >>> 200, 1,8000,varComme nts)
        >>> rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@ID" , 131,[/color][/color]
        > 1,9,varID)[color=green][color=darkred]
        >>> rsUpdate.Execut e()
        >>> %>[/color][/color][/color]

        --
        Microsoft MVP -- ASP/ASP.NET
        Please reply to the newsgroup. The email account listed in my From
        header is my spam trap, so I don't check it very often. You will get a
        quicker response by posting to the newsgroup.


        Comment

        • Bob Barrows [MVP]

          #5
          Re: The precision is invalid

          You do not have any output parameters, so you do not need a Command object:

          set cn = server.createob ject("adodb.con nection")
          cn.stp_Publishe r_Update varTitle, varArtist, varGender, ..., varID


          If you wish to persist in using the Command object, then you would probably
          benefit from my Stored procedure code Generator available from:


          Bob Barrows

          shank wrote:[color=blue]
          > Using Dreamweaver, I'm trying to update a table using a stored
          > procedure. I'm getting the following error. The line# reference is on
          > the last line: rsUpdate.Execut e(). That doesn't help much, but I'm
          > sure the problem must be with the number fields: Royalty (money) or
          > Ownership (float). How do I change the precision to match the table?
          > In this line: "@Royalty", 6, 1,8,varRoyalty, what does 6,1,8
          > represent. Where can I find a crossreference? I believe 6 is datatype
          > money, 8 is size in bytes. What is
          > 1...?
          > thanks
          >
          > Microsoft OLE DB Provider for SQL Server error '80004005'
          > The precision is invalid.
          >
          > <%
          > set rsUpdate = Server.CreateOb ject("ADODB.Com mand")
          > rsUpdate.Active Connection = ConnString
          > rsUpdate.Comman dText = "stp_Publisher_ Update"
          > rsUpdate.Comman dType = 4
          > rsUpdate.Comman dTimeout = 0
          > rsUpdate.Prepar ed = true
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Tit le", 200,
          > 1,255,varTitle)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Art ist", 200,
          > 1,255,varArtist )
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen der", 200,
          > 1,1,varGender)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen re", 200,
          > 1,50,varGenre)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Voc alRange",
          > 200, 1,20,varVocalRa nge)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gro upLevel",
          > 200, 1,20,varGroupLe vel)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Yea rReleased",
          > 200, 1,4,varYearRele ased)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Age nt", 200,
          > 1,50,varAgent)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Pub lisher", 200,
          > 1,50,varPublish er)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
          > 1,8,varRoyalty)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own er", 200,
          > 1,50,varOwner)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own ership", 131,
          > 1,9,varOwnershi p)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Wri ters", 200,
          > 1,255,varWriter s)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Com ments", 200,
          > 1,8000,varComme nts)
          > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@ID" , 131,
          > 1,9,varID) rsUpdate.Execut e()
          > %>[/color]

          --
          Microsoft MVP -- ASP/ASP.NET
          Please reply to the newsgroup. The email account listed in my From
          header is my spam trap, so I don't check it very often. You will get a
          quicker response by posting to the newsgroup.


          Comment

          • Bob Barrows [MVP]

            #6
            Re: The precision is invalid

            shank wrote:[color=blue]
            > what does 6,1,8
            > represent. Where can I find a crossreference?[/color]
            msdn.microsoft. com/library
            Go to Data Access and drill down until you get to te ADO Reference
            --
            Microsoft MVP -- ASP/ASP.NET
            Please reply to the newsgroup. The email account listed in my From
            header is my spam trap, so I don't check it very often. You will get a
            quicker response by posting to the newsgroup.


            Comment

            • shank

              #7
              Re: The precision is invalid

              I tried your code generator (which is very cool) but got the following
              error:
              ADODB.Command error '800a0bb9'
              Arguments are of the wrong type, are out of acceptable range, or are in
              conflict with one another.
              .CommandType=ad cmdstoredproc <-- This is the line causing the error
              Can you suggest why?
              thanks

              <%
              Dim cmd, param

              Set cmd=server.Crea teObject("ADODB .Command")
              With cmd
              .CommandType=ad cmdstoredproc <-- error
              .CommandText = "stp_Publisher_ Update"
              set .ActiveConnecti on=MM_BottomLin e_STRING
              set param = .createparamete r("@RETURN_VALU E", adInteger,
              adParamReturnVa lue, 0)
              .parameters.app end param
              set param = .createparamete r("@Title", adVarChar, adParamInput, 255,
              varTitle)
              .parameters.app end param
              set param = .createparamete r("@Artist", adVarChar, adParamInput, 255,
              varArtist)
              .parameters.app end param
              set param = .createparamete r("@Gender", adVarChar, adParamInput, 50,
              varGender)
              .parameters.app end param
              set param = .createparamete r("@Genre", adVarChar, adParamInput, 50,
              varGenre)
              .parameters.app end param
              set param = .createparamete r("@VocalRange" , adVarChar, adParamInput, 50,
              varVocalRange)
              .parameters.app end param
              set param = .createparamete r("@GroupLevel" , adVarChar, adParamInput, 50,
              varGroupLevel)
              .parameters.app end param
              set param = .createparamete r("@YearRelease d", adVarChar, adParamInput, 4,
              varYearReleased )
              .parameters.app end param
              set param = .createparamete r("@Agent", adVarChar, adParamInput, 255,
              varAgent)
              .parameters.app end param
              set param = .createparamete r("@Publisher ", adVarChar, adParamInput, 50,
              varPublisher)
              .parameters.app end param
              set param = .createparamete r("@Royalty", adCurrency, adParamInput, 0,
              varRoyalty)
              .parameters.app end param
              set param = .createparamete r("@Owner", adVarChar, adParamInput, 50,
              varOwner)
              .parameters.app end param
              set param = .createparamete r("@Ownership ", adNumeric, adParamInput, 0,
              varOwnership)
              param.precision =18
              param.numericsc ale=0
              .parameters.app end param
              set param = .createparamete r("@Writers", adVarChar, adParamInput, 255,
              varWriters)
              .parameters.app end param
              set param = .createparamete r("@Comments" , adVarChar, adParamInput, 8000,
              varComments)
              .parameters.app end param
              set param = .createparamete r("@ID", adNumeric, adParamInput, 0, varID)
              param.precision =18
              param.numericsc ale=0
              .parameters.app end param
              .execute ,,adexecutenore cords
              end with
              %>




              "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
              news:e8MYKuGkEH A.3140@TK2MSFTN GP15.phx.gbl...[color=blue]
              > You do not have any output parameters, so you do not need a Command[/color]
              object:[color=blue]
              >
              > set cn = server.createob ject("adodb.con nection")
              > cn.stp_Publishe r_Update varTitle, varArtist, varGender, ..., varID
              >
              >
              > If you wish to persist in using the Command object, then you would[/color]
              probably[color=blue]
              > benefit from my Stored procedure code Generator available from:
              > http://www.thrasherwebdesign.com/ind...s&hp=links.asp
              >
              > Bob Barrows
              >
              > shank wrote:[color=green]
              > > Using Dreamweaver, I'm trying to update a table using a stored
              > > procedure. I'm getting the following error. The line# reference is on
              > > the last line: rsUpdate.Execut e(). That doesn't help much, but I'm
              > > sure the problem must be with the number fields: Royalty (money) or
              > > Ownership (float). How do I change the precision to match the table?
              > > In this line: "@Royalty", 6, 1,8,varRoyalty, what does 6,1,8
              > > represent. Where can I find a crossreference? I believe 6 is datatype
              > > money, 8 is size in bytes. What is
              > > 1...?
              > > thanks
              > >
              > > Microsoft OLE DB Provider for SQL Server error '80004005'
              > > The precision is invalid.
              > >
              > > <%
              > > set rsUpdate = Server.CreateOb ject("ADODB.Com mand")
              > > rsUpdate.Active Connection = ConnString
              > > rsUpdate.Comman dText = "stp_Publisher_ Update"
              > > rsUpdate.Comman dType = 4
              > > rsUpdate.Comman dTimeout = 0
              > > rsUpdate.Prepar ed = true
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Tit le", 200,
              > > 1,255,varTitle)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Art ist", 200,
              > > 1,255,varArtist )
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen der", 200,
              > > 1,1,varGender)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gen re", 200,
              > > 1,50,varGenre)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Voc alRange",
              > > 200, 1,20,varVocalRa nge)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Gro upLevel",
              > > 200, 1,20,varGroupLe vel)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Yea rReleased",
              > > 200, 1,4,varYearRele ased)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Age nt", 200,
              > > 1,50,varAgent)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Pub lisher", 200,
              > > 1,50,varPublish er)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Roy alty", 6,
              > > 1,8,varRoyalty)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own er", 200,
              > > 1,50,varOwner)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Own ership", 131,
              > > 1,9,varOwnershi p)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Wri ters", 200,
              > > 1,255,varWriter s)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@Com ments", 200,
              > > 1,8000,varComme nts)
              > > rsUpdate.Parame ters.Append rsUpdate.Create Parameter("@ID" , 131,
              > > 1,9,varID) rsUpdate.Execut e()
              > > %>[/color]
              >
              > --
              > Microsoft MVP -- ASP/ASP.NET
              > Please reply to the newsgroup. The email account listed in my From
              > header is my spam trap, so I don't check it very often. You will get a
              > quicker response by posting to the newsgroup.
              >
              >[/color]


              Comment

              • Bob Barrows [MVP]

                #8
                Re: The precision is invalid

                Yes. Your version of adovbs.inc does not include the declaration for the
                acmdstoredproc constant. You can add the declaration yourself:

                Const adCmdStoredProc = &H0004

                Bob Barrows
                shank wrote:[color=blue]
                > I tried your code generator (which is very cool) but got the following
                > error:
                > ADODB.Command error '800a0bb9'
                > Arguments are of the wrong type, are out of acceptable range, or are
                > in conflict with one another.
                > .CommandType=ad cmdstoredproc <-- This is the line causing the error
                > Can you suggest why?
                > thanks
                >[/color]
                --
                Microsoft MVP - ASP/ASP.NET
                Please reply to the newsgroup. This email account is my spam trap so I
                don't check it very often. If you must reply off-line, then remove the
                "NO SPAM"


                Comment

                • shank

                  #9
                  Re: The precision is invalid

                  That wasn't it. It was in the adovbs.inc file.
                  thanks
                  '---- CommandTypeEnum Values ----
                  Const adCmdUnknown = &H0008
                  Const adCmdText = &H0001
                  Const adCmdTable = &H0002
                  Const adCmdStoredProc = &H0004 <----
                  Const adCmdFile = &H0100
                  Const adCmdTableDirec t = &H0200

                  "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
                  news:eONpBPOkEH A.3608@TK2MSFTN GP09.phx.gbl...[color=blue]
                  > Yes. Your version of adovbs.inc does not include the declaration for the
                  > acmdstoredproc constant. You can add the declaration yourself:
                  >
                  > Const adCmdStoredProc = &H0004
                  >
                  > Bob Barrows
                  > shank wrote:[color=green]
                  > > I tried your code generator (which is very cool) but got the following
                  > > error:
                  > > ADODB.Command error '800a0bb9'
                  > > Arguments are of the wrong type, are out of acceptable range, or are
                  > > in conflict with one another.
                  > > .CommandType=ad cmdstoredproc <-- This is the line causing the error
                  > > Can you suggest why?
                  > > thanks
                  > >[/color]
                  > --
                  > Microsoft MVP - ASP/ASP.NET
                  > Please reply to the newsgroup. This email account is my spam trap so I
                  > don't check it very often. If you must reply off-line, then remove the
                  > "NO SPAM"
                  >
                  >[/color]


                  Comment

                  • Bob Barrows [MVP]

                    #10
                    Re: The precision is invalid

                    Then it's a different line raising the error. The problem is the same: and
                    undeclared constant. Could it be the adExecuteNoReco rds constant? That
                    should be:

                    Const adExecuteNoReco rds = 128

                    Bob Barrows

                    shank wrote:[color=blue]
                    > That wasn't it. It was in the adovbs.inc file.
                    > thanks
                    > '---- CommandTypeEnum Values ----
                    > Const adCmdUnknown = &H0008
                    > Const adCmdText = &H0001
                    > Const adCmdTable = &H0002
                    > Const adCmdStoredProc = &H0004 <----
                    > Const adCmdFile = &H0100
                    > Const adCmdTableDirec t = &H0200
                    >
                    > "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
                    > news:eONpBPOkEH A.3608@TK2MSFTN GP09.phx.gbl...[color=green]
                    >> Yes. Your version of adovbs.inc does not include the declaration for
                    >> the acmdstoredproc constant. You can add the declaration yourself:
                    >>
                    >> Const adCmdStoredProc = &H0004
                    >>
                    >> Bob Barrows
                    >> shank wrote:[color=darkred]
                    >>> I tried your code generator (which is very cool) but got the
                    >>> following error:
                    >>> ADODB.Command error '800a0bb9'
                    >>> Arguments are of the wrong type, are out of acceptable range, or are
                    >>> in conflict with one another.
                    >>> .CommandType=ad cmdstoredproc <-- This is the line causing the error
                    >>> Can you suggest why?
                    >>> thanks
                    >>>[/color]
                    >> --
                    >> Microsoft MVP - ASP/ASP.NET
                    >> Please reply to the newsgroup. This email account is my spam trap so
                    >> I don't check it very often. If you must reply off-line, then remove
                    >> the "NO SPAM"[/color][/color]

                    --
                    Microsoft MVP - ASP/ASP.NET
                    Please reply to the newsgroup. This email account is my spam trap so I
                    don't check it very often. If you must reply off-line, then remove the
                    "NO SPAM"


                    Comment

                    • Bob Barrows [MVP]

                      #11
                      Re: The precision is invalid

                      Oh, wait! I see the problem:

                      set .ActiveConnecti on=MM_BottomLin e_STRING

                      You can't use Set when setting the activeconnectio n property to a string.
                      ..ActiveConnect ion=MM_BottomLi ne_STRING


                      You would be better off creating an explicit connection object in any case:

                      set cn=server.creat eobject("adodb. connection")
                      cn.open MM_BottomLine_S TRING
                      'hopefully, that string does not use ODBC
                      set .ActiveConnecti on=cn

                      Bob Barrows

                      --
                      Microsoft MVP - ASP/ASP.NET
                      Please reply to the newsgroup. This email account is my spam trap so I
                      don't check it very often. If you must reply off-line, then remove the
                      "NO SPAM"


                      Comment

                      Working...