473,473 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4092

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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.