CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.getting_started Tags:
Item Type: Date Entered: 6/10/2004 1:08:11 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 58 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
"smnet" <>
NewsGroup User
Error while executing Update using .ExecuteNonQuery6/10/2004 1:08:11 PM

0

************* Edited by moderator Adec ***************
Inserted missing < code></ code> tags. Always include such
tags when including code in your postings. Don't force the
moderators to do your work. Many readers disregard
postings without the code tags.
**************************************************

Hi,

I am getting "ORA-01722: invalid number" error when I execure my Update statement with IN clause.

Here is my procedure:

Public Function UpdateExportDtl(ByVal ORACon As OracleConnection, ByVal ORATra As OracleTransaction, ByVal lstrHeaderId As String) As Boolean

Dim OraCmd As OracleCommand

UpdateExportDtl = False

OraCmd = New OracleCommand(Me.UPDATE_EXPORT_DTL) --This has my update statement

OraCmd.CommandType = CommandType.Text

With OraCmd.Parameters
.Add(New OracleParameter(EXPORT_DATE_PAR, OracleType.VarChar, 10)).Value = System.DateTime.Now.ToString("yyyyMMdd")
.Add(New OracleParameter(EXPORT_BY_PAR, OracleType.VarChar, 30)).Value = HttpContext.Current.User.Identity.Name
.Add(New OracleParameter(LAST_UPDATE_USER_PAR, OracleType.VarChar, 30)).Value = HttpContext.Current.User.Identity.Name
.Add(New OracleParameter(HEADER_ID_PAR, OracleType.VarChar, 1000)).Value = lstrHeaderId
End With

With OraCmd
.Connection = ORACon
.Transaction = ORATra
.ExecuteNonQuery()
End With

UpdateExportDtl = True

Return UpdateExportDtl

End Function


Here is my Update Statement:

Private Const UPDATE_EXPORT_DTL As String = "UPDATE EXPORT_DBA.TB_BROKER_PMT_SMRY SET " _
& "EXPORT_DATE = :PAR_EXPORT_DATE, EXPORT_BY = :PAR_EXPORT_BY, " _
& "LAST_UPDATE_USER = :PAR_LAST_UPDATE_USER " _
& " WHERE HEADER_ID IN :PAR_HEADER_ID"

:PAR_EXPORT_DATE, etc are properly mapped as follows:

Public Const EXPORT_DATE_PAR As String = "PAR_EXPORT_DATE"
Public Const EXPORT_BY_PAR As String = "PAR_EXPORT_BY"
Public Const LAST_UPDATE_USER_PAR As String = "PAR_LAST_UPDATE_USER"
Public Const HEADER_ID_PAR As String = "PAR_HEADER_ID"


and I am passing :PAR_HEADER_ID value and that is as follows:

"(218,217,221,219,221,220,219,218,217,220)"


I event tried to put single quotes for all above values, but same error.

Can anyone help?

Thanx
cm

"bitmask" <>
NewsGroup User
Re: Error while executing Update using .ExecuteNonQuery6/10/2004 6:08:53 PM

0

The code is specifying a varchar parameter where Oracle wants to compare against a number. It's tough to pass a parameter to a stored procedure to use with the IN clause, i.e. there is a difference between

select * from t where x in ( 1, 2, 3 )

and

select * from t where x in "( 1, 2, 3 )"

in that the latter will never work. Perhaps this article can give you some pointers.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:













changed access rights event notification

[inquiry] linux in business

getting back to novell

routing table changes

high traffic from a server

need help.

cant receive message under vista

reply address gets changed to externaldom.externalpo.extuser

need help - sles vs windows2008 / windows7

help me keep novell

idm platform survey

help out a fellow novell guy

identify admin equivalent user accounts

novell administrator needed

zcm with vmware

user gpo not applying to terminal client session

novell client 4.91 sp5 install problems

find e-mail message by message id

accessing lotus 123 files on novell server

copy/move folders from oes linux (nss) to oes linux (nss)

password synch question nds and ad

automatic/prompted edirectory user creation

clients not getting gateway through dhcp

job: novel technical lead - lincoln, ne

internal error: fffffd29

reverse lookup for active directory in novell dns

advice about moving files from server 4.12 to a sbs 5.0

cedega, etc... ?

twm > gnome

red dot cms interface netware 5.1 with ldap services

novell 6.5 - arcserve emails

centralized antivirus without a domain

unable to login

zenworks agent 7.01

can't update trustee rights in consoleone from a vista pc

jre 1.4.2_18 update for consoleone 1.36h

restore files netware

asking for help about using regexp match user name

gw6 import document to shared folder via command line or app

http and https

user gpo not applying to terminal client session

ldap

loading module xnfs.nlm - init fail

logrotate dont recreates logfiles with 644

   
  Privacy | Contact Us
All Times Are GMT