Updating DB from Web Service ( the simple way!)

  • Thread starter Thread starter DDE
  • Start date Start date
D

DDE

Hi,

I am reading posts, KB articles and a lot of other sources for a week but I
can't still find the right answer!
I am looking to find the most simple way to updat an Oracle(through OLEDB)
table within a Webmethod.
Since the client is Infopath (thansks MS), the only way I can get the data
to my Webmethod is an XmlDocument.
So, I have and XmlDocument and an Ole DB connection to the table I would
like to update.
I am sure of the benefits of DataAdapters and Datasets, but I do not want to
write fifty five lines of code to update a single table!

Thanks

Dominique
 
Why don't you do something like this
OleDbConnection Conn=new OleBb(bla,bla,bla);
string sql="insert into.....";
OleDbCommand comm=new OleDbCommand(sql,Conn);
comm.ExecuteNonQuery();

and that is pretty much it. If you need to insert several
rows all you need to do is change the string
sql="insert into (another data);
comm.CommandText=sql;
comm.ExecuteNonQuery();

and you are done.

Hope this works
 
Yes, so simple and it works ..... why is this feature hidden so deep in the
doc ???

Thanks again

Dominique
 
Back
Top