can not update a row from GridView using Oracle DataBase

Hi ,

 I am try to build a web page from asp.net using VB.net code and oracle database

 My problem is :

 I made a GridView display the data from oracle database and assign the insert , update and delete from advance option in GrideView .

 when the data is displayed every thing is OK , but when click on "Edit" link and change any field value then click on " Update ".it show me an error message :

" You have specified that your update command compares all values on SqlDataSource 'Booking', but the dictionary passed in for oldValues is empty.  Pass in a valid dictionary for update or change your mode to OverwriteChanges "

 

Then i change the ConflictDetection of GridView to : OverwriteChanges , but it show to me this messgae :

 " Table name invalide "

 

Please help me how i can update and delete a row from GridView using oracle DB !!!!!

Crying

 

 

Below is the course code of GridView :

1    ProviderName="<%$ ConnectionStrings:opst.ProviderName %>"
2    SelectCommand="
3    
4    SELECT [BOOK_ID], 
5    [BOOK_TITLE], 
6    [BOOK_START_DATE], 
7    [BOOK_END_DATE], 
8    [BOOK_START_TIME_NAME], 
9    [BOOK_END_TIME_NAME], 
10   [NOTES] 
11   FROM [BOOKING]
12   " 
13   
14   ConflictDetection="CompareAllValues" 
15   
16   DeleteCommand=" 
17   
18   DELETE FROM [BOOKING] WHERE [BOOK_ID] = ? 
19   AND (([BOOK_TITLE] = ?) OR ([BOOK_TITLE] IS NULL AND ? IS NULL)) AND (([BOOK_START_DATE] = ?) OR 
20   ([BOOK_START_DATE] IS NULL AND ? IS NULL)) AND (([BOOK_END_DATE] = ?) OR ([BOOK_END_DATE] IS NULL AND
21    ? IS NULL)) AND (([BOOK_START_TIME_NAME] = ?) OR ([BOOK_START_TIME_NAME] IS NULL AND ? IS NULL)) AND
22    (([BOOK_END_TIME_NAME] = ?) OR ([BOOK_END_TIME_NAME] IS NULL AND ? IS NULL)) AND (([NOTES] = ?) OR 
23   ([NOTES] IS NULL AND ? IS NULL))" 
24   
25   InsertCommand="
26   
27   INSERT INTO [BOOKING] ([BOOK_ID], [BOOK_TITLE], [BOOK_START_DATE], [BOOK_END_DATE], [BOOK_START_TIME_NAME],
28   [BOOK_END_TIME_NAME], [NOTES]) VALUES 
29   (?, ?, ?, ?, ?, ?, ?)" 
30   
31   OldValuesParameterFormatString="original_{0}" 
32   
33   UpdateCommand="
34   
35   UPDATE [BOOKING] 
36   SET [BOOK_TITLE] = ?, [BOOK_START_DATE] = ?, [BOOK_END_DATE] = ?, [BOOK_START_TIME_NAME] = ?, 
37   [BOOK_END_TIME_NAME] = ?, [NOTES] = ? 
38   WHERE [BOOK_ID] = ? AND (([BOOK_TITLE] = ?) OR ([BOOK_TITLE] IS NULL AND ? IS NULL)) AND 
39   (([BOOK_START_DATE] = ?) OR ([BOOK_START_DATE] IS NULL AND ? IS NULL)) AND (([BOOK_END_DATE] = ?) OR 
40   ([BOOK_END_DATE] IS NULL AND ? IS NULL)) AND (([BOOK_START_TIME_NAME] = ?) OR ([BOOK_START_TIME_NAME] IS NULL 
41   AND ? IS NULL)) AND (([BOOK_END_TIME_NAME] = ?) OR ([BOOK_END_TIME_NAME] IS NULL AND ? IS NULL)) AND
42   (([NOTES] = ?) OR ([NOTES] IS NULL AND ? IS NULL))
43   
44   ">
45   
46   
47   
48   
 
0
naif224
4/24/2009 11:06:04 AM
asp.net.oracle 2269 articles. 0 followers. Follow

0 Replies
995 Views

Similar Articles

[PageSpeed] 2

Reply:

Similar Artilces:

how to implement login module using Oracle 10g database (logic & Oracle 10g Queries) and how can i use membership and roles with Oracle 10g & VS 2.0
 Hi all, Can any one tell me how to implement login module using Oracle 10g database (logic & Oracle 10g Queries) and how can I use membership and roles with Oracle 10g & vs 2.0. , for implement this is it compulsory to install oracle 10g server on the same machine on which I'm implementing this task  or otherwise i can use  other system as a server (like remote login or client server)  Hi,You should have the Oracle 10g Server or Client In your machine.In Case Client is in your Machine then Server Must be somewhere,that is enough to use.I hope then we ...

Can't connect to Oracle database using Oracle 10g Client in Windows 2003 Enterprise
Hi, Our test environment is Windows 2003 enterprise with IIS and Oracle 10g client installed. I wrote a simple asp.net program to connect to a Oracle database and display the select result in a datagrid. But can't connect to Oracle. It seems .NET can't find the oracle client. Any idea is highly appreciated. Thanks in advance. Joey...

Return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle
Hello, I am wondering if anyone in this community knows the shorter way to return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle, something likereturn (IDataReader) SqlHelper.ExecuteReader(ConnectionString, "GET_ACCOUNT", Id); instead of using the way below (look at the C# code) Stored Procedure create or replace PROCEDURE "GET_ACCOUNT" ( p_ID IN ACCOUNT.ID%type, retCursor OUT SA.MYGEN.sqlcur ) IS BEGIN OPEN retCursor FOR SELECT ID, NAME FROM ACCOUNT WHERE ID = p_ID ; ...

which is shou i use? Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET
Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NETI am confused?Which is better or which one should I use?BTW, I am going to use .net 2.0 with oracle 9. Can anyone tell me what shou I use for working with oracle database?Thanks very much in advance!Justin Oracle's data provider has more functionality than Microsoft's.If your doing transaction processing you can have SAVEPOINTs, which Microsoft's data provider does not provide.Also, Oracle has PL/SQL Associative Arrays which are very powerful.Oracle also allows you to bind parameters by name and pos...

Using a row selection in a gridview to create database rows for another gridview
Hi there, I have 2 gridviews on a form, the first displays some template rows from a database table.  The second displays some user specific rows (with additional data added to the template info) from the same table. They both work fine for displaying the info.  Now what I want to do, is allow users to 'select' a template row on the first gridview, and have that action automatically: create a new user-specific row, with added fields from profile data etc. insert it into the table then refresh the second gridview in order to show the new added row. C...

Error when updating datagrid row in Oracle Database
I'm new to asp.net and am using the tutorials provided online (www.asp.net) to get a jumpstart. But I've hit a snag in my editable datagrid. The datagrid where I'm pulling the information from is hitting an Oracle DB. I can choose to edit it fine, but when I use the update command to send changes to the DB, I get an error: ORA-00936: missing expression; It says the exception is being raised at this line in the debugger. Any thoughts? The sorting works fine. and canceling the operation also works fine. Not sure if it has to do with any priveliges to the Oracle DB. But I have the Orac...

Problems updating a table in Oracle using Gridview
Hi! I wonder if anyone has a solution to this problem. After creating a gridview and connecting to an oracle database (9.2) I successfully get the rows displayed. However after trying the Update and changing the value of a column I get the error below. The user I am connecting with has DBA rights in the database. [OracleException (0x80131938): ORA-12571: TNS:packet writer failure]   System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +167   System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandB...

I can use update but can't delete entry when using Gridview
My update link when using Gridview works but when I use the delete link I get an error.When I look at event view on the server I get this info: Exception information:     Exception type: SqlException     Exception message: The DELETE statement conflicted with the REFERENCE constraint "FK_Orders_Customers". The conflict occurred in database "C:\INETPUB\WWWROOT\DATABASE2\APP_DATA\NORTHWND2.MDF", table "dbo.Orders", column 'CustomerID'.  If you look at the script that creates the Orders table, you will see it h...

How call a Oracle Function using Microsoft .Net Oracle Client (System.Data.OracleClient)?
I try to call Oracle Function in .net C# by using System.Data.OracleClient. But i am not successful. Here is my code FUNCTION TTHAO_MONTT_EXISTS ( vten varchar2) RETURN boolean IS ret boolean; montt_id integer; BEGIN ret:=false; montt_id:= -1; select monthethao_id into montt_id from TTHAO_MONTHETHAO where ten = vten; if montt_id!=-1 then ret:=true; end if; return ret; Exception when others then return false; END; I do not know, when I call function TTHAO_MONTT_E...

Error when updating using DBIx::Recordset to Oracle database
My config: Linux, Redhat 7.0 Oracle 8.1.6.0 Apache 1.3.17 Perl-5.6.0 mod_perl-1.25 HTML::Embperl 1.3.1 DBI-1.1.14 DBD-Oracle-1.06 ApacheDBI-0.88 DBIx-Recordset-0.23 Selecting and inserting rows work fine, however when inserting records with DBIx::Recordset -> Insert I get the following error: [1843]ERR: 32: Line 60: Warning in Perl code: DBD::Oracle::db do failed: ORA-00971: missing SET keyword (DBD ERROR: OCIStmtExecute) at usr/lib/perl5/site_perl/5.6.0/DBIx/Database.pm line 152. This happens whether I'm doing something using an ex...

Can't connect to Oracle using Oracle 10g Client in Windows 2003 Enterprise
Hi, My test environment is Windows 2003 Enterprise with Oracle 10g Client and IIS installed. I wrote a simple asp.net page to connect to an Oracle database and display a query result in a datagrid. But can't connect to oracle. It seems that .NET can't find an oracle client. I was wondering if I miss some steps to configure .NET framework or something. Any idea is highly appreciated. Thanks in advance. Joey Do you have ASPNET user account is added to the Oracle software installed folders/subfolders? If not please add and restart the box and see, that could solve your proble...

Oracle store procedure problem using Powerbuilder and Oracle 8.0.4.0 Net
Powerbuilder version 6.0.00 / 6.5 Build 444 Oracle Net 8.0.4.0 I found there is problem with Oracle store procedure having more than 6 in parameters. I got GPF error on Window 95 and Dr. Watson error on NT. Also, I found it works find in Oracle Net 8.0.3.0. Is this a bug? Is there any new patch for this if it is a bug. Any recommendation about What version Oracle Net or SQL Net should I used for Oracle server version 8.0.4.0 (I don't think I am using any Oracle 8 new features)? Thanks in advance, Sharon Li If you use PB 6.5, you can try the new Oracle 8 driver: ftp...

Error when updating using DBIx::Recordset to Oracle database #2
I'm using: Linux, Redhat 7.0 Oracle 8.1.6.0 Apache 1.3.17 Perl-5.6.0 mod_perl-1.25 HTML::Embperl 1.3.1 DBI-1.1.14 DBD-Oracle-1.06 ApacheDBI-0.88 DBIx-Recordset-0.23 Selecting and inserting rows work fine, however when inserting records with DBIx::Recordset -> Insert I get the following error: [1843]ERR: 32: Line 60: Warning in Perl code: DBD::Oracle::db do failed: ORA-00971: missing SET keyword (DBD ERROR: OCIStmtExecute) at usr/lib/perl5/site_perl/5.6.0/DBIx/Database.pm line 152. This happens whether I'm doing something using an ...

Saving multiple rows in Oracle DB using ADO.NET
Hi,  I want to know how we can save multiple rows (gridview data) in Oracle DB (using ADO.NET) using a single connection.   Rgds u can use datatable.copy method. Thank uBabaPlease remember to click "Mark as Answer" on this post if it helped you. Hi,   Thanks for your reply. Can you please send me a sample code?   Rgds, Jai...

Web resources about - can not update a row from GridView using Oracle DataBase - asp.net.oracle

GridView SelectedItem Binding Gotcha in WinRT
Last night when I was doing some WinRT hacking I was trying to setup databinding to the selected item in the GridView control and I ran into ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Advanced Search Gridview Latest News Releases All ...

CNW Group
... Services Beyond the Wire About CNW my CNW CNW Access CNW Directories Financials Webcasts Events my CNW All News Releases Advanced Search Gridview ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Add a Filter Gridview Latest News Releases All Today ...

New CmdLets of Powershell 2.0
New CmdLets of Powershell 2.0

Price Drop: Softbox
... objects- create product reflection- changing the background with something more interestingUse it as:- softbox- honeycomb softbox- gridview ...

Profile.aspx: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 25 Oct 2012

DotNetKicks.com - Upcoming stories
DotNetKicks.com is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

View Features - ExtendASP
Call 847-681-9827 or Request a Demo View Features Testimonials Pricing About Us Coming Soon ExtendASP exposes every feature, more than any other ...

Resources last updated: 12/18/2015 3:47:10 AM