record the modified database

hello

Can someone show me a code to record a modified dataset in an oracle database
I write a web method to do it, which work good with ms access but not with oracle 8i
If you want my code, I wrote yesterday one the post intitled "update oracle data base"
pleaz I need a big help...!
Im starting with dotnet so i need assistance...
thank you
0
fayabun
7/24/2003 8:51:06 AM
asp.net.oracle 2269 articles. 0 followers. Follow

2 Replies
627 Views

Similar Articles

[PageSpeed] 4

Hi,

This goes against the scott/tiger demo table
Cheers
Greg

using System;
using System.Data;
using Oracle.DataAccess.Client;
public class addpk
{
public static void Main()
{
//open a connection, create a DataAdpater for a select on a view.
OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
con.Open();
OracleDataAdapter da = new OracleDataAdapter("select * from emp",con);

// create and fill the dataset
DataSet ds = new DataSet();
da.Fill(ds);

// a primary key constraint to the empno column of the dataset
DataColumn[] pk = new DataColumn[1];
pk[0] = ds.Tables[0].Columns["empno"];
ds.Tables[0].PrimaryKey = pk;

//update a row
Console.WriteLine("Changing deptno for {0} from {1} to 10\n",
ds.Tables[0].Rows[0]["ename"],ds.Tables[0].Rows[0]["deptno"]);
ds.Tables[0].Rows[0]["deptno"]=10;
//use CommandBuilder to generate the Update, Insert, and Delete Commands
OracleCommandBuilder cb = new OracleCommandBuilder(da);
//apply the changes to the dataset to the database
DataSet mychanges = ds.GetChanges();
if(mychanges != null)
{
da.Update(mychanges);
ds.AcceptChanges();
}
}
}
0
greg
7/24/2003 2:13:47 PM
thanks greg

but since my post I try with OleDb (because I have problems with updating my dataset with the oracledataadapter).
I only run the example given remplacing the MSAccess Database to an Oracle one.
I try with the ODP.net but I do not succes so i let it down and I took back the OleDb Driver for oracle.
Im trying to make a third architecture project.
Here is my code for the web service.
Imports System.Web.Services
<WebService(Namespace:="http://localhost/servora/")> _
Public Class Service1
Inherits System.Web.Services.WebService
#Region " Code généré par le Concepteur des services Web "
Public Sub New()
MyBase.New()
'Cet appel est requis par le Concepteur des services Web.
InitializeComponent()
'Ajoutez votre code d'initialisation après l'appel InitializeComponent()
End Sub
'Requis par le Concepteur des services Web
Private components As System.ComponentModel.IContainer
'REMARQUE : la procédure suivante est requise par le Concepteur des services Web
'Elle peut être modifiée en utilisant le Concepteur des services Web.
'Ne la modifiez pas en utilisant l'éditeur de code.
Friend WithEvents DataBag As servora.DataSet1
Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbCommand1 As System.Data.OleDb.OleDbCommand
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.DataBag = New servora.DataSet1()
Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection()
Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter()
Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand()
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand()
Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand()
Me.OleDbCommand1 = New System.Data.OleDb.OleDbCommand()
CType(Me.DataBag, System.ComponentModel.ISupportInitialize).BeginInit()
'
'DataBag
'
Me.DataBag.DataSetName = "DataSet1"
Me.DataBag.Locale = New System.Globalization.CultureInfo("fr-FR")
Me.DataBag.Namespace = "http://localhost/servora/DataSet1.xsd"
'
'OleDbConnection1
'
Me.OleDbConnection1.ConnectionString = "Provider=OraOLEDB.Oracle.1;Password=sce00019;Persist Security Info=True;User ID=s" & _
"ce00019;Data Source=etude;Extended Properties="""""
'
'OleDbDataAdapter1
'
Me.OleDbDataAdapter1.DeleteCommand = Me.OleDbDeleteCommand1
Me.OleDbDataAdapter1.InsertCommand = Me.OleDbCommand1
Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "TEPOINTS", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("IDLIEU", "IDLIEU"), New System.Data.Common.DataColumnMapping("X", "X"), New System.Data.Common.DataColumnMapping("Y", "Y"), New System.Data.Common.DataColumnMapping("CODPTS", "CODPTS"), New System.Data.Common.DataColumnMapping("LIBPTS", "LIBPTS"), New System.Data.Common.DataColumnMapping("CLASSFREQ", "CLASSFREQ"), New System.Data.Common.DataColumnMapping("CODTYPPTS", "CODTYPPTS"), New System.Data.Common.DataColumnMapping("CODENS", "CODENS"), New System.Data.Common.DataColumnMapping("LIBVIL", "LIBVIL"), New System.Data.Common.DataColumnMapping("CODRVB", "CODRVB"), New System.Data.Common.DataColumnMapping("SURFACE", "SURFACE"), New System.Data.Common.DataColumnMapping("NOMVIL", "NOMVIL"), New System.Data.Common.DataColumnMapping("CPVIL", "CPVIL"), New System.Data.Common.DataColumnMapping("NOMPAYS", "NOMPAYS"), New System.Data.Common.DataColumnMapping("NOMDEPT", "NOMDEPT"), New System.Data.Common.DataColumnMapping("NOMREG", "NOMREG"), New System.Data.Common.DataColumnMapping("ADRPTS", "ADRPTS")})})
Me.OleDbDataAdapter1.UpdateCommand = Me.OleDbUpdateCommand1
'
'OleDbDeleteCommand1
'
Me.OleDbDeleteCommand1.CommandText = "DELETE FROM TEPOINTS WHERE (CODPTS = ?) AND (ADRPTS = ? OR ? IS NULL AND ADRPTS I" & _
"S NULL) AND (CLASSFREQ = ? OR ? IS NULL AND CLASSFREQ IS NULL) AND (CODENS = ? O" & _
"R ? IS NULL AND CODENS IS NULL) AND (CODRVB = ?) AND (CODTYPPTS = ?) AND (CPVIL " & _
"= ? OR ? IS NULL AND CPVIL IS NULL) AND (IDLIEU = ?) AND (LIBPTS = ? OR ? IS NUL" & _
"L AND LIBPTS IS NULL) AND (LIBVIL = ?) AND (NOMDEPT = ? OR ? IS NULL AND NOMDEPT" & _
" IS NULL) AND (NOMPAYS = ? OR ? IS NULL AND NOMPAYS IS NULL) AND (NOMREG = ? OR " & _
"? IS NULL AND NOMREG IS NULL) AND (NOMVIL = ? OR ? IS NULL AND NOMVIL IS NULL) A" & _
"ND (SURFACE = ? OR ? IS NULL AND SURFACE IS NULL) AND (X = ? OR ? IS NULL AND X " & _
"IS NULL) AND (Y = ? OR ? IS NULL AND Y IS NULL)"
Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection1
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODPTS", System.Data.OleDb.OleDbType.VarChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ADRPTS", System.Data.OleDb.OleDbType.VarChar, 1000, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ADRPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ADRPTS1", System.Data.OleDb.OleDbType.VarChar, 1000, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ADRPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CLASSFREQ", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CLASSFREQ", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CLASSFREQ1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CLASSFREQ", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODENS", System.Data.OleDb.OleDbType.VarChar, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODENS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODENS1", System.Data.OleDb.OleDbType.VarChar, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODENS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODRVB", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CODRVB", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODTYPPTS", System.Data.OleDb.OleDbType.Decimal, 0, System.Data.ParameterDirection.Input, False, CType(20, Byte), CType(0, Byte), "CODTYPPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CPVIL", System.Data.OleDb.OleDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CPVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CPVIL1", System.Data.OleDb.OleDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CPVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_IDLIEU", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "IDLIEU", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_LIBPTS", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIBPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_LIBPTS1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIBPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_LIBVIL", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIBVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMDEPT", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMDEPT", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMDEPT1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMDEPT", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMPAYS", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMPAYS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMPAYS1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMPAYS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMREG", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMREG", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMREG1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMREG", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMVIL", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMVIL1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_SURFACE", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "SURFACE", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_SURFACE1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "SURFACE", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_X", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "X", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_X1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "X", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Y", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "Y", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Y1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "Y", System.Data.DataRowVersion.Original, Nothing))
'
'OleDbSelectCommand1
'
Me.OleDbSelectCommand1.CommandText = "SELECT IDLIEU, X, Y, CODPTS, LIBPTS, CLASSFREQ, CODTYPPTS, CODENS, LIBVIL, CODRVB" & _
", SURFACE, NOMVIL, CPVIL, NOMPAYS, NOMDEPT, NOMREG, ADRPTS FROM TEPOINTS"
Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
'
'OleDbUpdateCommand1
'
Me.OleDbUpdateCommand1.CommandText = "UPDATE TEPOINTS SET IDLIEU = ?, X = ?, Y = ?, CODPTS = ?, LIBPTS = ?, CLASSFREQ =" & _
" ?, CODTYPPTS = ?, CODENS = ?, LIBVIL = ?, CODRVB = ?, SURFACE = ?, NOMVIL = ?, " & _
"CPVIL = ?, NOMPAYS = ?, NOMDEPT = ?, NOMREG = ?, ADRPTS = ? WHERE (CODPTS = ?) A" & _
"ND (ADRPTS = ? OR ? IS NULL AND ADRPTS IS NULL) AND (CLASSFREQ = ? OR ? IS NULL " & _
"AND CLASSFREQ IS NULL) AND (CODENS = ? OR ? IS NULL AND CODENS IS NULL) AND (COD" & _
"RVB = ?) AND (CODTYPPTS = ?) AND (CPVIL = ? OR ? IS NULL AND CPVIL IS NULL) AND " & _
"(IDLIEU = ?) AND (LIBPTS = ? OR ? IS NULL AND LIBPTS IS NULL) AND (LIBVIL = ?) A" & _
"ND (NOMDEPT = ? OR ? IS NULL AND NOMDEPT IS NULL) AND (NOMPAYS = ? OR ? IS NULL " & _
"AND NOMPAYS IS NULL) AND (NOMREG = ? OR ? IS NULL AND NOMREG IS NULL) AND (NOMVI" & _
"L = ? OR ? IS NULL AND NOMVIL IS NULL) AND (SURFACE = ? OR ? IS NULL AND SURFACE" & _
" IS NULL) AND (X = ? OR ? IS NULL AND X IS NULL) AND (Y = ? OR ? IS NULL AND Y I" & _
"S NULL)"
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("IDLIEU", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "IDLIEU", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("X", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "X", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Y", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "Y", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("CODPTS", System.Data.OleDb.OleDbType.VarChar, 20, "CODPTS"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("LIBPTS", System.Data.OleDb.OleDbType.VarChar, 100, "LIBPTS"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("CLASSFREQ", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CLASSFREQ", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("CODTYPPTS", System.Data.OleDb.OleDbType.Decimal, 0, System.Data.ParameterDirection.Input, False, CType(20, Byte), CType(0, Byte), "CODTYPPTS", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("CODENS", System.Data.OleDb.OleDbType.VarChar, 4, "CODENS"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("LIBVIL", System.Data.OleDb.OleDbType.VarChar, 100, "LIBVIL"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("CODRVB", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CODRVB", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("SURFACE", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "SURFACE", System.Data.DataRowVersion.Current, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("NOMVIL", System.Data.OleDb.OleDbType.VarChar, 100, "NOMVIL"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("CPVIL", System.Data.OleDb.OleDbType.VarChar, 10, "CPVIL"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("NOMPAYS", System.Data.OleDb.OleDbType.VarChar, 100, "NOMPAYS"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("NOMDEPT", System.Data.OleDb.OleDbType.VarChar, 100, "NOMDEPT"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("NOMREG", System.Data.OleDb.OleDbType.VarChar, 100, "NOMREG"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("ADRPTS", System.Data.OleDb.OleDbType.VarChar, 1000, "ADRPTS"))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODPTS", System.Data.OleDb.OleDbType.VarChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ADRPTS", System.Data.OleDb.OleDbType.VarChar, 1000, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ADRPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ADRPTS1", System.Data.OleDb.OleDbType.VarChar, 1000, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ADRPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CLASSFREQ", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CLASSFREQ", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CLASSFREQ1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CLASSFREQ", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODENS", System.Data.OleDb.OleDbType.VarChar, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODENS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODENS1", System.Data.OleDb.OleDbType.VarChar, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CODENS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODRVB", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "CODRVB", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CODTYPPTS", System.Data.OleDb.OleDbType.Decimal, 0, System.Data.ParameterDirection.Input, False, CType(20, Byte), CType(0, Byte), "CODTYPPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CPVIL", System.Data.OleDb.OleDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CPVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_CPVIL1", System.Data.OleDb.OleDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CPVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_IDLIEU", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "IDLIEU", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_LIBPTS", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIBPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_LIBPTS1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIBPTS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_LIBVIL", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIBVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMDEPT", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMDEPT", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMDEPT1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMDEPT", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMPAYS", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMPAYS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMPAYS1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMPAYS", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMREG", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMREG", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMREG1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMREG", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMVIL", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_NOMVIL1", System.Data.OleDb.OleDbType.VarChar, 100, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NOMVIL", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_SURFACE", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "SURFACE", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_SURFACE1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "SURFACE", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_X", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "X", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_X1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "X", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Y", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "Y", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Y1", System.Data.OleDb.OleDbType.VarNumeric, 0, System.Data.ParameterDirection.Input, False, CType(38, Byte), CType(0, Byte), "Y", System.Data.DataRowVersion.Original, Nothing))
'
'OleDbCommand1
'
Me.OleDbCommand1.CommandText = "INSERT INTO TEPOINTS (IDLIEU, X, Y, CODPTS, LIBPTS, CLASSFREQ, CODTYPPTS, CODENS," & _
" LIBVIL, CODRVB, SURFACE, NOMVIL, CPVIL, NOMPAYS, NOMDEPT, NOMREG, ADRPTS) VALUE" & _
"S (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Me.OleDbCommand1.Connection = Me.OleDbConnection1
CType(Me.DataBag, System.ComponentModel.ISupportInitialize).EndInit()
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
'CODEGEN : cette procédure est requise par le Concepteur des services Web
'Ne la modifiez pas en utilisant l'éditeur de code.
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
#End Region
<WebMethod()> Public Function RetrieveData() As DataSet1
Dim DataBag As New DataSet1()
OleDbDataAdapter1.Fill(DataBag)
Return DataBag
End Function

<WebMethod()> Public Function UpdateData(ByVal ChangeBag As DataSet1) As DataSet1
If Not (ChangeBag Is Nothing) Then
OleDbDataAdapter1.Update(ChangeBag)
Return ChangeBag
Else
Return Nothing
End If
End Function
End Class


I have only write the two web method...
Can youTell me If you see a mistake and
can you tell me If I Have to do a web method to insert and delete data from my oracle data base...???...
Thank you
than
0
fayabun
8/5/2003 2:09:18 PM
Reply:

Similar Artilces:

Help me pls. i wan't code for startup and shutdown oracle database with vb.net or c#.net
Help me pls. i wan't code for startup and shutdown oracle database with vb.net or c#.net In Windows, it would be easier to interact with Oracle by way of the service...  (I've not tried it myself, but this should work fine for a service installed on the same machine as the .net application:using System.ServiceProcess; ServiceController controller = new ServiceController(); controller.MachineName = "."; controller.ServiceName = "OracleServiceORCL"; string status = controller.Status.ToString(); // Stop the service controller.Stop(); // Start the ...

I want to modify one record,but the Datagrid modify all record,why?
some codes as follow: I want to modify one record,but the Datagrid modify all record,why? private void DataGrid2_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e){string key=Convert.ToString(DataGrid2.DataKeys[e.Item.ItemIndex]);SqlCommandBuilder cb=new SqlCommandBuilder(sqlDataAdapter1);sqlDataAdapter1.Fill(dataSet11,"Accounts_Users");DataTable dt=dataSet11.Tables["Accounts_Users"]; DataRow[] rw=dt.Select("UserID='"+key+"'");// a record is affected,in other words,the DataRow instance rw obtains one record.DataRow editRow=rw[0]; //this codes...

Modify database in Oracle problem
Posted this before as tech support said I need to go thru this world class newsgroup support. Hopefully someone will respond this time. I am using the latest 9.5 version of PowerDesigner. I have reverse engineered an existing database which is fairly simple. Having the following problems: - sequences are not associated with the appropriate column in a table. They are imported, but not used. I had to manually associate them with the correct column in the table. - When I reverse engineer a database, make some changes, then do Database > Modify, it creates the script, ...

urgent: .NET Provider for Oracle or Oracle Data Provider for .NET
If I want to access Oracle DB in ASP.NET application, and I am using .NET Provider for Oracle or Oracle Data Provider for .NET, should I have to install OracleClient on my .NET server? Is there other choice? Thank you very much.Johnson Johnson2007:should I have to install OracleClient on my .NET server?  You have to options1. install the ODP.NET on your web serverOR2. put the oracle assemblies in your BIN directory   Hi jimmy,Thank you for you reply. Because I could not find a server right now, I should test it first before I agree or disagree with you, as most articles I...

Modifying Records in SQL Database Programmatically
VWD 2005 Express.  Visual Basic.  SQL Server 2005. I know how to set up SqlDataSources and their insert, delete, update, and select commands.  I also have code for querying a Sql table and populating a dataset and scanning the dataset for values.  However, I do not know how to modify records in a Sql table programmatically.  Here is what I need to do: I need to open a Sql table. I need to process record bny record to check a particular field for a particular value. If the field has the particular value, I need to change it and write the record back to the table w...

Modify Database Oracle Problem with SDO_GEOMETRY
Hello, I've got a problem with creating a modification script. In some cases the script contains alter table statements as it should be. But in some cases a tmp-Table will be created, the data will be copied and so. That's not what I want. In all cases columns will only be added, there is no dropping or modification of existing columns. It seams that the second behaviour occurs, when the table contains columns with the data type SDO_GEOMETRY. The columns I want to add are not SDO_GEOMETRY columns. Is there something like a rule, that when there is an non-standard c...

how to insert the edited record into oracle database?
hi...anyone can help ? i m not sure how to updated the record in asp.net and insert it into oracle..Dim updated1 As OracleCommand strUpdate = "UPDATE itsl_log SET requestby=:requesby"updated1 = New OracleCommand(strUpdate, DBSqlConnection) updated1.Parameters.AddWithValue(":requestby", CType(Formview1.FindControl("hfstaffid"), HiddenField).Value) updated1.ExecuteNonQuery() something wrong with my code? This article explains How to do it. http://msdn.microsoft.com/en-us/library/ms971506.aspx ADOCommand MyCommand2 = new ADOCommand("INSERT INTO COUN...

VB.NET to oracle database connection
Hello,  I've been trying for days to try to connect to oracle database but still no success, I've put the connection in the web.config in the <ConnectionString> place, created the connection on the page itself: Private sqlCon As New OleDbConnection("Provider=msdaora;Data Source=Server1/orcl2;User Id=Train;Password=Train;") but still no success, Now I'm trying to make a local connection throught Tools > Connect to database but still no success. All I get is this: System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve service name at Could ...

Updating record in Oracle database table
Hi, How do I add parameters for two columns to a command object used for updating an Oracle database table.  One column (column1) has a datatype of NUMBER while the other (column2) has a datatype of NUMBER(4,3) in the Oracle database table. Values for column1 and column2 could be NULL. I tried the following but it did not work using System.Data.OracleClient; using System.Data.SqlTypes; OracleCommand cmd=conn.CreateCommand( ); cmd.Parameters.Add( "COLUMN1" , OracleType .Number ).Value=COLUMN_1.Text.ToString( ); cmd.Parameters.Add( "COLUMN2" , OracleType .Num...

Oracle Database - .NET
first of all hello and nice to see you all. this is my first post on this forum and it seems pretty useful..okay just got a small question... i have started to implement Compiere (http://www.compiere.org) in a factory 1. Installed Linux 2. Installed Oracle XE 10g what i want to do is to connect on the oracle database from VS .NET 2005 i checked ConnectionStrings.com nothing worked .. anyone got a solution for this?Did any one every connect from ASP .NET or a Windows Application on oracle running on a linux (CENTOS server)?  thankskimoo   Hi,    ...

Add, Modify, Delete database records
I'm looking to learn how to add new records, modify records and delete records from my mySQL database using asp.net and vb.net I already know how to make the connection and display the records. do you use the same methods as in any other database such as Access? posting a link to where I can find this info (as long as it's specific enough) would be awsome. thanks Tory :) I think I got it figured out.. thanks for people trying to do the same as me... you can view http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=287400...

VB.NET and Oracle database, help
i am trying to connect to a Oracle database using VB.NET. that database has one table which has one entry in it. no compilation errors, no runtime errors... but no result either.i've downloaded the system.data.oracleclient.dll as u can see i referenced it in the code, i've opened a connection manually(not with the code) with the oracle database.here's the code: <%@ Page Language="vb" Explicit="true" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" CompilerOptions='/R:"C:\Pr...

problem in getting records from oracle database...
hi frnds... Please help me in this query.... i am using vs2005,asp.net,vb code,oracle database... my scenario is like this...  i have four link buttons in my webform.. first,next,previous,last... Imports System.Data  Imports System.Data.oledb  Partial Class District Inherits System.Web.UI.Page  Dim con As New OleDbConnection("provider=msdaora.1;user id=civil;password=civil") Dim da As New OleDbDataAdapter("select * from district", con) Dim ds As New DataSet Dim cb As New OleDbCommandBuilder Dim N As Byte Private Sub filldata(ByVal r...

Display the record history of a main record for each main record in a database.
Hi: I am kinda new at this and I would like to know how to display the record history of a main record for each main record in a database.  For example:  The user inputs a request for a repair to their facility.  Then other users will come behind them and add more comments to that original request or delete it or edit it in the form of a NEW record.  I capture each edit or delete as a new record in the database with Action = "edit" or Action = "delete" so that we can keep a running history of all comments.  What I would like to do is show th...

Web resources about - record the modified database - asp.net.oracle

List of varieties of genetically modified maize - Wikipedia, the free encyclopedia
^ Deliberately cultivated tolerance has effects similar to the naturally acquired traits of resistance in pest species, i.e., enhanced capacity ...

Retro Cars - The coolest modified classic cars on the App Store on iTunes
Get Retro Cars - The coolest modified classic cars on the App Store. See screenshots and ratings, and read customer reviews.

All sizes - Modified Photo: "Starry sky over Ontario farm" - Flickr - Photo Sharing!
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

AmbiPi modified XBMC showing Avatar fire scene + Telldus Control, Raspberry Pi with custom PixelPi
Veröffentlicht am 14.03.2013 Home theathere with modified XBMC running AmbiPi, Raspberry Pi with custom PixelPi showing Avatar fire scene. ...

St Kilda recruit Nathan Freeman to begin pre-season on Monday with modified program
While Jake Carlisle will start the pre-season with St Kilda's youngest players, Nathan Freeman will only be there in part.

Perth gas buses to be modified after fires
Perth's fleet of 474 natural gas-fuelled buses will be taken off the road in stages over the next 18 months so all vehicles can be modified following ...

Modified online children's privacy rules take effect in US - U.S. Federal Trade Commission, regulation ...
Some websites and mobile app developers are confused about how to comply with revised rules governing the online collection of personal information ...

Genetically modified food: The truth about GMO food
IT&#8217;S accused of causing cancer, destroying the environment and storing up devastating health risks for our children. Genetically modified ...

Green light for genetically modified apples that don't brown
The US Department of Agriculture says it is okay for two varieties of genetically engineered non-browning apples to be sold in the United States. ...

"US scientists say they have bred a genetically modified (GM) mosquito that can resist malaria infection." ...
"If the lab technique works in the field, it could offer a new way of stopping the biting insects from spreading malaria to humans, they say. ...

Resources last updated: 12/21/2015 6:25:24 PM