473,811 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The precision is invalid. -- Stored procedure,..

help, I'm trying to access a stored procedure The stored procedure works fine
when run from the server) the code is below -

CREATE PROCEDURE updatepricing
@siteid INT,
@siteid2 INT,
@siteid3 INT,
@siteid4 INT,
@siteid5 INT,
@siteid6 INT,
@siteid7 INT,
@siteid8 INT,
@7dayrate DECIMAL(7,2),
@14dayrate DECIMAL(7,2),
@21dayrate DECIMAL(7,2),
@28dayrate DECIMAL(7,2),
@reguseractive CHAR(1),
@reguser5active CHAR(1),
@reguser10activ e CHAR(1),
@multiuseractiv e CHAR(1),
@reguserrate DECIMAL(7,2),
@reguser5rate DECIMAL(7,2),
@reguser10rate DECIMAL(7,2),
@multiuserrate DECIMAL(7,2)
AS
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @7dayrate
WHERE JBATSiteID = @siteid and JBATValue = '7'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @14dayrate
WHERE JBATSiteID = @siteid2 and JBATValue = '14'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @21dayrate
WHERE JBATSiteID = @siteid3 and JBATValue = '21'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @28dayrate
WHERE JBATSiteID = @siteid4 and JBATValue = '28'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @reguserrate, JBATActive = @reguseractive
WHERE JBATSiteID = @siteid5 and JBATValue = 'reguser'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @reguser5rate, JBATActive = @reguser5active
WHERE JBATSiteID = @siteid6 and JBATValue = 'reguser5'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @reguser10rate, JBATActive = @reguser10activ e
WHERE JBATSiteID = @siteid7 and JBATValue = 'reguser10'
UPDATE dbo.JBAccountTy pe
SET JBATPrice = @multiuserrate, JBATActive = @multiuseractiv e
WHERE JBATSiteID = @siteid8 and JBATValue = 'multiuser'
GO

However when i try and run this from an ASP page with the following code --
<%

Dim updatepricingCo mmand__siteid
updatepricingCo mmand__siteid = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid =
Session("SITEID ")

Dim updatepricingCo mmand__siteid2
updatepricingCo mmand__siteid2 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid2 =
Session("SITEID ")

Dim updatepricingCo mmand__siteid3
updatepricingCo mmand__siteid3 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid3 =
Session("SITEID ")

Dim updatepricingCo mmand__siteid4
updatepricingCo mmand__siteid4 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid4 =
Session("SITEID ")

Dim updatepricingCo mmand__siteid5
updatepricingCo mmand__siteid5 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid5 =
Session("SITEID ")

Dim updatepricingCo mmand__siteid6
updatepricingCo mmand__siteid6 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid6 =
Session("SITEID ")

Dim updatepricingCo mmand__siteid7
updatepricingCo mmand__siteid7 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid7 =
Session("SITEID ")

Dim updatepricingCo mmand__siteid8
updatepricingCo mmand__siteid8 = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid8 =
Session("SITEID ")

Dim updatepricingCo mmand__7dayrate
updatepricingCo mmand__7dayrate = "0"
if(Request.Quer yString("day7") <"") then updatepricingCo mmand__7dayrate =
Request.QuerySt ring("day7")

Dim updatepricingCo mmand__14dayrat e
updatepricingCo mmand__14dayrat e = "0"
if(Request.Quer yString("day14" ) <"") then updatepricingCo mmand__14dayrat e
= Request.QuerySt ring("day14")

Dim updatepricingCo mmand__21dayrat e
updatepricingCo mmand__21dayrat e = "0"
if(Request.Quer yString("day21" ) <"") then updatepricingCo mmand__21dayrat e
= Request.QuerySt ring("day21")

Dim updatepricingCo mmand__28dayrat e
updatepricingCo mmand__28dayrat e = "0"
if(Request.Quer yString("day28" ) <"") then updatepricingCo mmand__28dayrat e
= Request.QuerySt ring("day28")

Dim updatepricingCo mmand__regusera ctive
updatepricingCo mmand__regusera ctive = "n"
if(Request.Quer yString("ru") <"") then updatepricingCo mmand__regusera ctive
= Request.QuerySt ring("ru")

Dim updatepricingCo mmand__reguser5 active
updatepricingCo mmand__reguser5 active = "n"
if(Request.Quer yString("ru5") <"") then
updatepricingCo mmand__reguser5 active = Request.QuerySt ring("ru5")

Dim updatepricingCo mmand__reguser1 0active
updatepricingCo mmand__reguser1 0active = "n"
if(Request.Quer yString("ru10") <"") then
updatepricingCo mmand__reguser1 0active = Request.QuerySt ring("ru10")

Dim updatepricingCo mmand__multiuse ractive
updatepricingCo mmand__multiuse ractive = "n"
if(Request.Quer yString("mu") <"") then
updatepricingCo mmand__multiuse ractive = Request.QuerySt ring("mu")

Dim updatepricingCo mmand__reguserr ate
updatepricingCo mmand__reguserr ate = "0"
if(Request.Quer yString("ruserc harge") <"") then
updatepricingCo mmand__reguserr ate = Request.QuerySt ring("ruserchar ge")

Dim updatepricingCo mmand__reguser5 rate
updatepricingCo mmand__reguser5 rate = "0"
if(Request.Quer yString("ruser5 charge") <"") then
updatepricingCo mmand__reguser5 rate = Request.QuerySt ring("ruser5cha rge")

Dim updatepricingCo mmand__reguser1 0rate
updatepricingCo mmand__reguser1 0rate = "0"
if(Request.Quer yString("ruser1 0charge") <"") then
updatepricingCo mmand__reguser1 0rate = Request.QuerySt ring("ruser10ch arge")

Dim updatepricingCo mmand__multiuse rrate
updatepricingCo mmand__multiuse rrate = "0"
if(Request.Quer yString("muserc harge") <"") then
updatepricingCo mmand__multiuse rrate = Request.QuerySt ring("muserchar ge")

%>
<%

set updatepricingco mmand = Server.CreateOb ject("ADODB.Com mand")
updatepricingco mmand.ActiveCon nection = MM_recruta2_STR ING
updatepricingco mmand.CommandTe xt = "dbo.updatepric ing"
updatepricingco mmand.CommandTy pe = 4
updatepricingco mmand.CommandTi meout = 0
updatepricingco mmand.Prepared = true
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@RETURN _VALUE", 3, 4)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid ", 3,
1,5,updateprici ngcommand__site id)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 2", 3,
1,5,updateprici ngcommand__site id2)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 3", 3,
1,5,updateprici ngcommand__site id3)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 4", 3,
1,5,updateprici ngcommand__site id4)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 5", 3,
1,5,updateprici ngcommand__site id5)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 6", 3,
1,5,updateprici ngcommand__site id6)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 7", 3,
1,5,updateprici ngcommand__site id7)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@siteid 8", 3,
1,5,updateprici ngcommand__site id8)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@7dayra te", 14,
1,7,2,updatepri cingcommand__7d ayrate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@14dayr ate", 14,
1,7,2,updatepri cingcommand__14 dayrate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@21dayr ate", 14,
1,7,2,updatepri cingcommand__21 dayrate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@28dayr ate", 14,
1,7,2,updatepri cingcommand__28 dayrate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@reguse ractive", 129,
1,1,updateprici ngcommand__regu seractive)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@reguse r5active", 129,
1,1,updateprici ngcommand__regu ser5active)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@reguse r10active", 129,
1,1,updateprici ngcommand__regu ser10active)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@multiu seractive", 129,
1,1,updateprici ngcommand__mult iuseractive)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@reguse rrate", 14,
1,7,2,updatepri cingcommand__re guserrate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@reguse r5rate", 14,
1,7,2,updatepri cingcommand__re guser5rate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@reguse r10rate", 14,
1,7,2,updatepri cingcommand__re guser10rate)
updatepricingco mmand.Parameter s.Append
updatepricingco mmand.CreatePar ameter("@multiu serrate", 14,
1,7,2,updatepri cingcommand__mu ltiuserrate)
updatepricingco mmand.Execute()

%>

I get the following error --
Microsoft OLE DB Provider for SQL Server error '80004005'
The precision is invalid.
/admin/afterreviewupda tepricing.asp, line 115
I think this has something to do with the decimal values??? but an really
stuck...

Appreciate any help you can give..

Thanks
Feb 21 '08 #1
3 3865
GTN170777 wrote:
You're right, I've deleted the variables @siteid2 - @siteid8, so now
my SP reads -

CREATE PROCEDURE updatepricing
@siteid INT,
@7dayrate DECIMAL(7,2),
@14dayrate DECIMAL(7,2),
@21dayrate DECIMAL(7,2),
@28dayrate DECIMAL(7,2),
@reguseractive CHAR(1),
@reguser5active CHAR(1),
@reguser10activ e CHAR(1),
@multiuseractiv e CHAR(1),
@reguserrate DECIMAL(7,2),
@reguser5rate DECIMAL(7,2),
@reguser10rate DECIMAL(7,2),
@multiuserrate DECIMAL(7,2)
AS

I'm still a little confused though -- (i've uploaded the following
code)

Dim conn
set conn = createobject("a dodb.connection ")
conn.open MM_recruta2_STR ING
conn.updatepric ing updatepricingCo mmand__siteid, _
updatepricingCo mmand__7dayrate , _
updatepricingCo mmand__14dayrat e, _
updatepricingCo mmand__21dayrat e, _
updatepricingCo mmand__28dayrat e, _
updatepricingCo mmand__regusera ctive, _
updatepricingCo mmand__reguser5 active, _
updatepricingCo mmand__reguser1 0active, _
updatepricingCo mmand__multiuse ractive, _
updatepricingCo mmand__reguserr ate, _
updatepricingCo mmand__reguser5 rate, _
updatepricingCo mmand__reguser1 0rate, _
updatepricingCo mmand__multiuse rrate
****
updatepricingco mmand.Execute()
***
Why did you put that there? That did not appear in my code sample did
it? The procedure has already been executed at this point ... without an
explicit command object.
>
Should there be anything after the "updatepricingC ommand__7dayrat e,
_" to "updatepricingC ommand__multius errate" lines?
because I can't see the --

""With updatepricingco mmand
>Set parm = .CreateParamete r("@7dayrate" , 14,1)
parm.Precisi on = 7
parm.NumericSc ale = 2
..Parameters.A ppend parm
parm.value = updatepricingco mmand__7dayrate
End With""
That part is only needed if you wish to continue using an explicit
command object. I was suggesting an alternative technique that did not
require all those CreateParameter calls.
--
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.
Feb 21 '08 #2
IGNORE that last comment Bob,

Again you are a star, thank you so much - I think i've got it working...

Cheers my friend

"Bob Barrows [MVP]" wrote:
GTN170777 wrote:
You're right, I've deleted the variables @siteid2 - @siteid8, so now
my SP reads -

CREATE PROCEDURE updatepricing
@siteid INT,
@7dayrate DECIMAL(7,2),
@14dayrate DECIMAL(7,2),
@21dayrate DECIMAL(7,2),
@28dayrate DECIMAL(7,2),
@reguseractive CHAR(1),
@reguser5active CHAR(1),
@reguser10activ e CHAR(1),
@multiuseractiv e CHAR(1),
@reguserrate DECIMAL(7,2),
@reguser5rate DECIMAL(7,2),
@reguser10rate DECIMAL(7,2),
@multiuserrate DECIMAL(7,2)
AS

I'm still a little confused though -- (i've uploaded the following
code)

Dim conn
set conn = createobject("a dodb.connection ")
conn.open MM_recruta2_STR ING
conn.updatepric ing updatepricingCo mmand__siteid, _
updatepricingCo mmand__7dayrate , _
updatepricingCo mmand__14dayrat e, _
updatepricingCo mmand__21dayrat e, _
updatepricingCo mmand__28dayrat e, _
updatepricingCo mmand__regusera ctive, _
updatepricingCo mmand__reguser5 active, _
updatepricingCo mmand__reguser1 0active, _
updatepricingCo mmand__multiuse ractive, _
updatepricingCo mmand__reguserr ate, _
updatepricingCo mmand__reguser5 rate, _
updatepricingCo mmand__reguser1 0rate, _
updatepricingCo mmand__multiuse rrate

****
updatepricingco mmand.Execute()
***
Why did you put that there? That did not appear in my code sample did
it? The procedure has already been executed at this point ... without an
explicit command object.

Should there be anything after the "updatepricingC ommand__7dayrat e,
_" to "updatepricingC ommand__multius errate" lines?
because I can't see the --

""With updatepricingco mmand
Set parm = .CreateParamete r("@7dayrate" , 14,1)
parm.Precision = 7
parm.NumericSca le = 2
..Parameters.Ap pend parm
parm.value = updatepricingco mmand__7dayrate
End With""

That part is only needed if you wish to continue using an explicit
command object. I was suggesting an alternative technique that did not
require all those CreateParameter calls.
--
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.
Feb 21 '08 #3
Thanks Bob, done that, it through in a few errors that i tried to fix, hence
code now looks like -

<%

Dim updatepricingCo mmand__siteid
updatepricingCo mmand__siteid = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid =
CLng(Session("S ITEID"))

Dim updatepricingCo mmand__7dayrate
updatepricingCo mmand__7dayrate = "0"
if(Request.Quer yString("day7") <"") then
updatepricingCo mmand__7dayrate = CSng(Request.Qu eryString("day7 "))

Dim updatepricingCo mmand__14dayrat e
updatepricingCo mmand__14dayrat e = "0"
if(Request.Quer yString("day14" ) <"") then
updatepricingCo mmand__14dayrat e = CSng(Request.Qu eryString("day1 4"))

Dim updatepricingCo mmand__21dayrat e
updatepricingCo mmand__21dayrat e = "0"
if(Request.Quer yString("day21" ) <"") then
updatepricingCo mmand__21dayrat e = CSng(Request.Qu eryString("day2 1"))

Dim updatepricingCo mmand__28dayrat e
updatepricingCo mmand__28dayrat e = "0"
if(Request.Quer yString("day28" ) <"") then
updatepricingCo mmand__28dayrat e = CSng(Request.Qu eryString("day2 8"))

Dim updatepricingCo mmand__regusera ctive
updatepricingCo mmand__regusera ctive = "n"
if(Request.Quer yString("ru") <"") then
updatepricingCo mmand__regusera ctive = Request.QuerySt ring("ru")

Dim updatepricingCo mmand__reguser5 active
updatepricingCo mmand__reguser5 active = "n"
if(Request.Quer yString("ru5") <"") then
updatepricingCo mmand__reguser5 active = Request.QuerySt ring("ru5")

Dim updatepricingCo mmand__reguser1 0active
updatepricingCo mmand__reguser1 0active = "n"
if(Request.Quer yString("ru10") <"") then
updatepricingCo mmand__reguser1 0active = Request.QuerySt ring("ru10")

Dim updatepricingCo mmand__multiuse ractive
updatepricingCo mmand__multiuse ractive = "n"
if(Request.Quer yString("mu") <"") then
updatepricingCo mmand__multiuse ractive = Request.QuerySt ring("mu")

Dim updatepricingCo mmand__reguserr ate
updatepricingCo mmand__reguserr ate = "0"
if(Request.Quer yString("ruserc harge") <"") then
updatepricingCo mmand__reguserr ate = CSng(Request.Qu eryString("ruse rcharge"))

Dim updatepricingCo mmand__reguser5 rate
updatepricingCo mmand__reguser5 rate = "0"
if(Request.Quer yString("ruser5 charge") <"") then
updatepricingCo mmand__reguser5 rate = CSng(Request.Qu eryString("ruse r5charge"))

Dim updatepricingCo mmand__reguser1 0rate
updatepricingCo mmand__reguser1 0rate = "0"
if(Request.Quer yString("ruser1 0charge") <"") then
updatepricingCo mmand__reguser1 0rate =
CSng(Request.Qu eryString("ruse r10charge"))

Dim updatepricingCo mmand__multiuse rrate
updatepricingCo mmand__multiuse rrate = "0"
if(Request.Quer yString("muserc harge") <"") then
updatepricingCo mmand__multiuse rrate = CSng(Request.Qu eryString("muse rcharge"))

Dim conn
set conn = createobject("a dodb.connection ")
conn.open MM_recruta2_STR ING
conn.updatepric ing updatepricingCo mmand__siteid, _
updatepricingCo mmand__7dayrate , _
updatepricingCo mmand__14dayrat e, _
updatepricingCo mmand__21dayrat e, _
updatepricingCo mmand__28dayrat e, _
updatepricingCo mmand__regusera ctive, _
updatepricingCo mmand__reguser5 active, _
updatepricingCo mmand__reguser1 0active, _
updatepricingCo mmand__multiuse ractive, _
updatepricingCo mmand__reguserr ate, _
updatepricingCo mmand__reguser5 rate, _
updatepricingCo mmand__reguser1 0rate, _
updatepricingCo mmand__multiuse rrate
%>

The Errors being the %at the end and there was third ) after
"CSng(Request.Q ueryString("day 7"))" which i removed. Also the top bit which
reads -

<%

Dim updatepricingCo mmand__siteid
updatepricingCo mmand__siteid = "0"
if(Session("SIT EID") <"") then updatepricingCo mmand__siteid =
CLng(Session("S ITEID"))

should this read -

CSng(Session("S ITEID")) instead of CLng(Session("S ITEID")) ??

Now i get the following error --

"Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/admin/afterreviewupda tepricing.asp, line 84 "

Sorry and thanks G
"Bob Barrows [MVP]" wrote:
GTN170777 wrote:
You're right, I've deleted the variables @siteid2 - @siteid8, so now
my SP reads -

CREATE PROCEDURE updatepricing
@siteid INT,
@7dayrate DECIMAL(7,2),
@14dayrate DECIMAL(7,2),
@21dayrate DECIMAL(7,2),
@28dayrate DECIMAL(7,2),
@reguseractive CHAR(1),
@reguser5active CHAR(1),
@reguser10activ e CHAR(1),
@multiuseractiv e CHAR(1),
@reguserrate DECIMAL(7,2),
@reguser5rate DECIMAL(7,2),
@reguser10rate DECIMAL(7,2),
@multiuserrate DECIMAL(7,2)
AS

I'm still a little confused though -- (i've uploaded the following
code)

Dim conn
set conn = createobject("a dodb.connection ")
conn.open MM_recruta2_STR ING
conn.updatepric ing updatepricingCo mmand__siteid, _
updatepricingCo mmand__7dayrate , _
updatepricingCo mmand__14dayrat e, _
updatepricingCo mmand__21dayrat e, _
updatepricingCo mmand__28dayrat e, _
updatepricingCo mmand__regusera ctive, _
updatepricingCo mmand__reguser5 active, _
updatepricingCo mmand__reguser1 0active, _
updatepricingCo mmand__multiuse ractive, _
updatepricingCo mmand__reguserr ate, _
updatepricingCo mmand__reguser5 rate, _
updatepricingCo mmand__reguser1 0rate, _
updatepricingCo mmand__multiuse rrate

****
updatepricingco mmand.Execute()
***
Why did you put that there? That did not appear in my code sample did
it? The procedure has already been executed at this point ... without an
explicit command object.

Should there be anything after the "updatepricingC ommand__7dayrat e,
_" to "updatepricingC ommand__multius errate" lines?
because I can't see the --

""With updatepricingco mmand
Set parm = .CreateParamete r("@7dayrate" , 14,1)
parm.Precision = 7
parm.NumericSca le = 2
..Parameters.Ap pend parm
parm.value = updatepricingco mmand__7dayrate
End With""

That part is only needed if you wish to continue using an explicit
command object. I was suggesting an alternative technique that did not
require all those CreateParameter calls.
--
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.
Feb 21 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3341
by: shank | last post by:
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.Execute(). 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?...
4
7854
by: Roger Leigh | last post by:
Hello, I'm writing a fixed-precision floating point class, based on the ideas in the example fixed_pt class in the "Practical C++ Programming" book by Steve Oualline (O' Reilly). This uses a long int to store the value, and the precision (number of decimal points) is variable (it's a templated class): template <size_t _decimal_places = 4> class FixedFloat {
2
2239
by: adams114 | last post by:
I am having a strange problem with invalid type casts. I am trying to update a MS SQL Database with a stored procedure. When I setup the parameters collection for the command object I get a invalid cast exception error: Compiler Error Message: BC30311: Value of type 'Date' cannot be converted to 'Integer'. The real problem here is that the type in the database and the stored prcedure aren't integers at all rather they are datetime...
1
8438
by: Andy G | last post by:
I've been getting this error all day. Could someone please look at my stored procedure and the code. I have a form that grabs and email address the user types in, calls a stored procedure with an input parameter and an output parameter, compared the email to a table and matches an ID in another table to grab the Username. thanks for any helps guys/girls! Andy :)
1
4916
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm specifiying my code: The Code used in Visual Studio: Function GetRank(ByVal ID As Integer, ByVal Comp As String, ByVal Sec As String, ByVal iDate As Date) As String 'Dim Ret As Integer
4
27496
by: daz_oldham | last post by:
Hi All I am trying to execute a stored procedure that does a very simple lookup and returns a text field. However, when I try to execute it, I am getting a rather strange error that I can't seem to fix! There is defiantely information coming back as I have tested this in Query Analyzer. The error actuall comes on my oCmd.ExecuteNonQuery(); String: the Size property has an invalid size of 0.
2
22880
by: Bill_DBA | last post by:
I have the following stored procedure that is called from the source of a transformation in a DTS package. The first parameter turns on PRINT debug messages. The second, when equals 1, turns on the openning, fetching, and closing of a cursor. Things are fine if only one of the two parameters was set to 1. When run with both parameters turned on, "dba_test_dts 1, 1", DTS source (tab) preview fails because it thinks no row was returned....
3
7423
by: ianforgroupuse | last post by:
I'm running Vista Business edition on 2005 Virtual PC. Installed SQL Server 2005 Express latest download, with instance of MSSQLSERVER and service accounts running under "NT AUTHORITY\SYSTEM". Mixed mode authentication specified and sa password specified. Used server manager to create user login with sysadmin role. Login using windows authentication. Run my application and database is created and populated with default records.
8
1644
by: K Viltersten | last post by:
I've seen some people calling a stored procedure on MS SQL Server and intercepting an invalid parameter list by a switch statement, demanding that each of the parameters names is exactly as the one in the procedure that's about to be called. If we let in an invalid parameter, we'll get the following error message. Msg 8145, Level 16, State 1, Procedure Prc, Line 0 @Param is not a parameter for procedure Prc.
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9215
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7676
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5567
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5702
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3028
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.