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: 52 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:













question about create a link

keypress

why to use constructors

why does my gridview disappear when previewed with a browser?

how to

system.web.ui.design.urleditor is not defined

cookie's question...

presentation layer help

needs help with showing information to be edited

http verb post used to access path

submit form when user presses enter

pulling a large recordset

really strange namespace error

removing id field from gridview without removing it from parameters

.net and sharepoint for support site

beginner needs help getting started

asp.net 2.0 and .net 2.0

object reference not being returned

updatepanel - dropdownlist autopostback=true validation

please help, modify my code for datareader in my asp.net page

.aspx conversion into .html problem

static and non static constructors

fxcop with vs2005

.net / mysql database / date column

populating a list box

could not find file "c:\inetpub\wwwroot\group19\atextfile".

meta tags dynamically generated from database

creating a new control

checkboxlist

parsing a string to a table or dataset.

problem with dropdownlist

floating point number to an integer.

first day in asp.net

structures, character arrays, and unmanaged code in c#

asp/vb.net display box

switching between 2 websites with the same database

difference between asp.net web application and asp.net web site

file system actions

one user with viewstate errors

accessing web.config frequently

specified argument was out of the range of valid values.

div tag - dagagrid width problem

a simple task, but i need help

how to search for a string in all items of a project

loop question

page loads, controls move and flicker!?

banner question

creating monthly report from one field id - how??

i want to export my gridview details in xsl format but if user don't have ms office then how can it possible

how to add links in datagrid?

   
  Privacy | Contact Us
All Times Are GMT