473,396 Members | 1,702 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,396 software developers and data experts.

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.Parameters.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.Parameters.Add(colname,
oracleds.Tables(0).Columns(colloopy).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 1243
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
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...
10
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
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...
1
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...
4
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...
5
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,...
3
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...
7
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...
3
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
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...
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,...

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.