473,785 Members | 2,789 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 1262
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
1959
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
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10151
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...
0
9950
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...
1
7499
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3647
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.