I'm writing a web service in .NET to work with Delphi clients. Delphi
uses ADO so I want to convert the Dataset to a Recordset and vice-
versa. It appears a Web Service cannot publish a web method with a
Recordset return so I save the RecordSet to an XML string:
SqlDataAdapter sa = new SqlDataAdapter( "Select * FROM " +
table , oConn);
DataSet ds = new DataSet();
sa.Fill(ds, table);
sa.FillSchema(d s.Tables[0], SchemaType.Sour ce);
Recordset rs = new Recordset();
rs = ConvertToRecord set(ds.Tables[0]);
Stream streamObj = new Stream();
// Save the recordset's XML representation in a stream object
rs.Save(streamO bj, PersistFormatEn um.adPersistXML );
// Get the string (XML) of the recordset
string outputXml = streamObj.ReadT ext(streamObj .Size);
The XML works fine in Delphi. Now I want to make changes and send back
the XML and load into a Recordset or reverse the process. The
Recordset doesn't have a Load method. I'm new to CSharp and am not
sure how to load the xml from ADO into a Recordset. I would like to
avoid using files and load the XML string. Is there a way of doing
this?
Thanks
John 2 7653
If recordset is what you want then you can load the xmlstring into a dataset
and then use ConvertToRecord set to get the recordset
--
Misbah Arefin
"john0600" wrote:
I'm writing a web service in .NET to work with Delphi clients. Delphi
uses ADO so I want to convert the Dataset to a Recordset and vice-
versa. It appears a Web Service cannot publish a web method with a
Recordset return so I save the RecordSet to an XML string:
SqlDataAdapter sa = new SqlDataAdapter( "Select * FROM " +
table , oConn);
DataSet ds = new DataSet();
sa.Fill(ds, table);
sa.FillSchema(d s.Tables[0], SchemaType.Sour ce);
Recordset rs = new Recordset();
rs = ConvertToRecord set(ds.Tables[0]);
Stream streamObj = new Stream();
// Save the recordset's XML representation in a stream object
rs.Save(streamO bj, PersistFormatEn um.adPersistXML );
// Get the string (XML) of the recordset
string outputXml = streamObj.ReadT ext(streamObj .Size);
The XML works fine in Delphi. Now I want to make changes and send back
the XML and load into a Recordset or reverse the process. The
Recordset doesn't have a Load method. I'm new to CSharp and am not
sure how to load the xml from ADO into a Recordset. I would like to
avoid using files and load the XML string. Is there a way of doing
this?
Thanks
John
"john0600" <jw*****@gmail. comwrote in message news:40******** *************** ***********@y5g 2000hsf.googleg roups.com...
I'm writing a web service in .NET to work with Delphi clients. Delphi
uses ADO so I want to convert the Dataset to a Recordset and vice-
versa. It appears a Web Service cannot publish a web method with a
Recordset return so I save the RecordSet to an XML string:
SqlDataAdapter sa = new SqlDataAdapter( "Select * FROM " +
table , oConn);
DataSet ds = new DataSet();
sa.Fill(ds, table);
sa.FillSchema(d s.Tables[0], SchemaType.Sour ce);
Recordset rs = new Recordset();
rs = ConvertToRecord set(ds.Tables[0]);
Stream streamObj = new Stream();
// Save the recordset's XML representation in a stream object
rs.Save(streamO bj, PersistFormatEn um.adPersistXML );
// Get the string (XML) of the recordset
string outputXml = streamObj.ReadT ext(streamObj .Size);
The XML works fine in Delphi. Now I want to make changes and send back
the XML and load into a Recordset or reverse the process. The
Recordset doesn't have a Load method. I'm new to CSharp and am not
sure how to load the xml from ADO into a Recordset. I would like to
avoid using files and load the XML string. Is there a way of doing
this?
Thanks
John
True that it doesn't have a "Load" method, However, the XML can be loaded using the Open method.
Open "Data.XML"
--
Al Reid This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Martin CLAVREUIL |
last post by:
hi all,
how can i load in an adodb.recordset a remote xml file on another http
server.
if i use the simple ole-db provider, that work as an admin only. (according
to ms, this component mustn't be used for non-interactive users.
So i found serverxmlhttp but ...
i can load the remote source in,
i can load it in an domdoc, as describe in the msdn,
|
by: Bruno Luis |
last post by:
Hello
I'm using A97 and i'm having some trouble with creating a recordset
with data from two different databases.
I connect to a remote database and make this data the default source
for my continuous form (Set me.recordset = rs). The problem is: one of
the fields of the remote database is a foreign key (two digit number),
and the table with the correspondence is in my local database... i
have no way of altering the remote database....
|
by: Patrick Gonzalez |
last post by:
Is it possible to use the built-in filter functions (ie. "Filter by
Selection", etc..) when a form's recordsource has been set to a
recordset object during the load event. When I try to do this, I
receive the message "Cannot apply filter on one or more fields
specified in the filter property".
here is the code for the recordset creation:
Set conn = New ADODB.Connection
Set rsSQL = New ADODB.Recordset
|
by: Lyn |
last post by:
If I have a form where the RecordSource property is set to the name of a
table, then on opening the SingleForm form I can cycle through all the
records in the table one at a time via Next and Previous buttons on the
form.
However, I only want to cycle through a subset of the table. I have a
parent form which inputs selection criteria. With the selection criteria I
create a RecordSet (using ADO) in the parent form. The RecordSet object...
|
by: Mac |
last post by:
Hi all
I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.
The XML String is from a adodb recordset saved as via a
stream.
Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
| |
by: Mark |
last post by:
Hello.
Before going further, I should mention that I have found a
workaround for this problem. However, I thought it was
sufficiently interesting to try to find out what is causing it.
I have a form which launches when the application is started.
The form is not initially databound. . .the user must first select
a value from a combobox on the form. When the user selects
a value, an appropriate recordset is created and cloned to the
|
by: Codebug |
last post by:
Trying to load a query in Access 2003 as a recordset, returns error 3061, too few parameters, Expected 1.
Dim StrSQL As String
Dim rs As DAO.Recordset
Dim db As DAO.Database
StrSQL = "<some_SQL_Statement>"
Set db = CurrentDb()
|
by: Tomino |
last post by:
Hi all,
I have a sticky question, it's killing me for weeks so i hope to find the answer here. I have a query to filter records from a table. From these results I want to edit the records with recordset, to make a recordset works fine, but to edit one made me an old man ... :-(
Can somebody please tell me how to edit records with a recordset? The meaning is that I load the records in a subform on my existing form where the user can edit the...
|
by: =?Utf-8?B?R1ROMTcwNzc3?= |
last post by:
Hi Guys, thanks for your help yesterday, I've got one more question, then I
think I'm done for now,...
Is it possible to insert recordset data in a javascript, for instance I have
a javascript code that calculates the total price, depending on number of
units, currently what the code does is set the price like so -
if qty 1 then £99+VAT
if qty equall to or greater than 2 and equall to or less than 9 then price =
|
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,...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |