473,770 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data adaptor.update confusion

OK I'm lost.... Hope I can describe this that you will understand what I'm
taking about.

I have an Oracle dataset and I've inserted some rows into it, I now want to
update the database. I managed to do this by going thru each row and
creating an oraclecommand, passing the parameters and executenonquery , and
it works reasonablly well.

However instead of doing all that looping thru rows, I believe I can use the
dataadapter UPDATE method to do this for me.

Here is what I've done

Built an oraclecommand with INSERT INTO TEST (field1, field2) VALUES (?,?)
Set my dataadaptors insertcommand to the oraclecommand above
Added datamappings for my two columns

BUT..... I'm confused to how I create parameters. When updating row by row
I would do thecmd.Paramete rs.Add(colname, "THEVALUE") , but in this case I
don't have a value because it's based on the row currently being inserted.

How do I create the parameters? I tried this thecmd.Paramete rs.Add(colname,
oracleds.Tables (0).Columns(col loopy).DataType ), but I get "Object must
implement Iconvertable"
I hope this makes sense to someone, sorry for the long post
Paul
Jul 21 '05 #1
1 1261
Paul,

In this newsgroup the ones who are Oracle experts are answering sometimes.
They do that forever in this newsgroup (some like Oracle questions).

Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet

I hope this helps,

Cor
Jul 21 '05 #2

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

Similar topics

1
1773
by: | last post by:
Greetings All, I'm trying to access a excel file using the odbc data adaptor but the tables arent showing up. I can get connected to the excel file using the Wizard but when I go to do the odbc adaptor no tables show up in the query wizard why is this? TIA
10
1483
by: KevinMGore | last post by:
The following code: Try da.Update(ds.Tables(dg1Name)) Catch ex As Exception Console.WriteLine(ex.ToString) MessageBox.Show(ex.ToString) End Try causes this error:
1
254
by: Paul | last post by:
OK I'm lost.... Hope I can describe this that you will understand what I'm taking about. I have an Oracle dataset and I've inserted some rows into it, I now want to update the database. I managed to do this by going thru each row and creating an oraclecommand, passing the parameters and executenonquery, and it works reasonablly well. However instead of doing all that looping thru rows, I believe I can use the dataadapter UPDATE...
1
1334
by: bill.jenner | last post by:
Since upgrading from .NET 2003 to .NET 2005, I've had a few problems adjusting. One, I seem unable to get around is not having the DataAdaptor available to me from the tool box. It appears I only have DataSets and TableAdaptors available to me. In the code behind section, I'm unable to update my information to the database simply because I don't have the DataAdaptor.update available to me. I attempted TableAdaptor.update() but can't seem...
4
1363
by: Andrew Chalk | last post by:
I have some data in a DataSet and want to write it back to the underlying SQL Server database. Is there any simple "one-liner" way to write a dataset back to its database or do I have to go through the steps of creating a command object, adding parameters and calling ExecuteNonQuery(). Many thanks.
5
10904
by: Pankaj | last post by:
Hi i am inserting the data into database throught variables. On click event of button m using this code: Dim objCon As New OleDbConnection(CONNECTION) Dim objCmd As New OleDbCommand(SQL, objCon) SQL = "INSERT INTO linkinfo VALUES('" & Sno & "','" & Website & "','" & Path & "')" & _ "('" & Keywords & "','" & MeWebsite & "','" & MePath & "','" &
3
1958
by: PengYu.UT | last post by:
Suppose I want a ring_iterator, which is almost like the vector::iterator. But it will equals begin(), when it passed the end(). It is easy to write an adaptor for it. But I'm wondering if there is any publicly available code for it. Thanks, Peng
7
2895
by: Greg P | last post by:
I'm new to VS2005 and want to simply update my data with the dataGridView that was generated when I draged my query from the Data Sources Pane. I think I may need to create a Data Adaptor but I'm not sure? The other think I saw was to implement IEditable? How would I do that? Where in my code woudl I do that considering I am not creating the DataGridView via code? I know this is probably the easist thing to do I just don't know how?...
3
1338
by: iKiLL | last post by:
Hi all The Code is below but i will give you a brief over view first. I am using C#, SQL Mobile and the CF2.0 with Merge Replication. My Primary Keys are all "uniqueidentifier" types with default value of
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8883
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.