Unix Technical Forum

ASP/OO4O Problem: Unexpect result from package

This is a discussion on ASP/OO4O Problem: Unexpect result from package within the Oracle Database forums, part of the Database Server Software category; --> I'm working on my first Oracle DB, so bear with me... I have a couple of validation routines which ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 06:44 AM
CJM
 
Posts: n/a
Default ASP/OO4O Problem: Unexpect result from package

I'm working on my first Oracle DB, so bear with me...

I have a couple of validation routines which are both returning the same
result regardless of the inputs. One checks if a Serial No already exists,
the other checks if a Part No is valid.

Currently there are no Serial Nos in the system, so this check shouldnt
fail. And I get a response to indicate that the Part No is valid regardless
of whether it is or not.

I strongly suspect that I'm made the same mistake in each case, but since
I'm not getting any errors, I can't see where.

In both cases, the PL/SQL procedures return a value of 1, whereas if I run
the PL/SQL in SQL Developer with suitable values inserted I get the expected
results


>>>>>>>>>>>>>>>>>>>>>>>>

ASP Snippets:
>>>>>>>>>>>>>>>>>>>>>>>>

Function SerialExists (sSerialNo, sPartNo)
Dim iResult, bResult

With oDB
.Parameters.Add "sSerialNo", sSerialNo, ORAPARM_INPUT
.Parameters ("sSerialNo").ServerType = ORATYPE_VARCHAR2

.Parameters.Add "sPartNo", sPartNo, ORAPARM_INPUT
.Parameters ("sPartNo").ServerType = ORATYPE_VARCHAR2

.Parameters.Add "iResult", 0, ORAPARM_OUTPUT
.Parameters ("iResult").ServerType = ORATYPE_NUMBER

iResult = oDB.ExecuteSQL("Begin VALIDATION_PKG.SerialExists(:sSerialNo,
:sPartNo, :iResult); end;")

If iResult > 0 then bResult = true Else bResult = false
response.Write bResult & "<BR>"

SerialExists = bResult

.Parameters.Remove "sSerialNo"
.Parameters.Remove "sPartNo"
.Parameters.Remove "iResult"

End With
End Function


'check that SerialNo/PartNo not used
If SerialExists(sSerialNo, sPartNo) then iError = iError + 2

'check for valid partnos
If Not IsValidPartNo(sPartNo) then iError = iError + 4


>>>>>>>>>>>>>>>>>>>>>>

Package Specification:
>>>>>>>>>>>>>>>>>>>>>>






Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 06:44 AM
CJM
 
Posts: n/a
Default Re: ASP/OO4O Problem: Unexpect result from package

Ignore this - prematurely posted.

Will repost (fully) soon....

CJM


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com