473,379 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

asp.net 2.0 with Oracle delete command


Hi all -

I am trying to use ASP.NET 2.0 to delete a row in an Oracle database
table GC_LOG
(see following, note that my connection string is fine, everything else
like updateCommand is working)
The ID and ACTION are varchar2(10) and varchar2(200) respectively:

-------------------------
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$%ConnectionStrings:Connection String1 %>"
ProviderName="<%$
ConnectionStrings:ConnectionString1.ProviderName %>"

DeleteCommand=' DELETE GC_LOG
WHERE ID=:ID and ACTION=:ACTION ' >

<DeleteParameters>
<asp:Parameter Name="ID" />
<asp:Parameter Name="ACTION" />
</DeleteParameters>
</asp:SqlDataSource>
----------------------------

However, I got following error:
System.Data.OracleClient.OracleException: ORA-01008: not all
variables bound

Stack Trace:

[OracleException (0x80131938): ORA-01008: not all variables bound
]
System.Data.OracleClient.OracleConnection.CheckErr or(OciErrorHandle
errorHandle, Int32 rc) +167
System.Data.OracleClient.OracleCommand.Execute(Oci StatementHandle
statementHandle, CommandBehavior behavior, Boolean needRowid,
OciRowidDescriptor& rowidDescriptor, ArrayList&
resultParameterOrdinals) +1719

System.Data.OracleClient.OracleCommand.ExecuteNonQ ueryInternal(Boolean
needRowid, OciRowidDescriptor& rowidDescriptor) +503
System.Data.OracleClient.OracleCommand.ExecuteNonQ uery() +125

System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
command, DataSourceOperation operation) +493

System.Web.UI.WebControls.SqlDataSourceView.Execut eDelete(IDictionary
keys, IDictionary oldValues) +913
System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary
oldValues, DataSourceViewOperationCallback callback) +176
System.Web.UI.WebControls.GridView.HandleDelete(Gr idViewRow row,
Int32 rowIndex) +912
System.Web.UI.WebControls.GridView.HandleEvent(Eve ntArgs e, Boolean
causesValidation, String validationGroup) +1067
System.Web.UI.WebControls.GridView.RaisePostBackEv ent(String
eventArgument) +214

System.Web.UI.WebControls.GridView.System.Web.UI.I PostBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+244
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+3840

---------------

I then changed the deleteparameters part to
<DeleteParameters>
<asp:Parameter Name="@ID" />
<asp:Parameter Name="@ACTION" />
</DeleteParameters>

it said "illegal variable name/number"

then, <DeleteParameters>
<asp:Parameter Name=":ID" />
<asp:Parameter Name=":ACTION" />
</DeleteParameters>

there is no error, but the deleting wasn't carried out -- the data is
still there (although I tested the delete statement manually , it is
working from sqlPlus commnd line).
I also tried to add Type="String" and Type="Empty" in parameter
section, no luck either...

do I miss anything? please help and advise... thanks!
george

Oct 24 '06 #1
0 4086

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

Similar topics

4
by: Greg Lindstrom | last post by:
Greetings- I am running Python 2.3.3 on HP-UX and would like to access an Oracle 9i database. Looking through the vaults, I see 4 or 5 modules that might work and was wondering if anyone is...
4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
3
by: Ritu | last post by:
Hello Folks, I chanced upon this newsgroup in my search for a solution to a problem I am facing. I hope someone can give me a pointer. I have a table in an Oracle 8i database that performs the...
0
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
2
by: Francis Awofeso | last post by:
Please if anyone with experience with VB.Net and Oracle can describe the steps it will take to connect to Oracle, or can refer me to a link where I can lookup the ateps or process required to...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
9
by: AnandaSim | last post by:
Hi All, I've had Access 97, 2000 connections to the corporate Oracle database for a few years now - but seldom use it. When I did use it years ago, performance was not fast but the features were...
6
by: Randall Smith | last post by:
I am going to sync a schema in postgres with one in an oracle db. The tables are simple, but there are 200 of them. I would like to try to keep the sync lag < 1 minute. Here is my idea. Please...
0
by: DrSnap | last post by:
Hi, Admitted I am a newbie to Oracle (databases in general) but now Ive installed the Oracle DB v.10g and the ODAC development tools for Microsoft Visual Studio 2005. So, now i've found out,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.