473,324 Members | 2,356 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,324 software developers and data experts.

Transfer Stream of Recordset

Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
.....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />

Nov 23 '07 #1
6 2413
On Nov 23, 8:22 pm, "Harvey Triana" <eslender2...@hotmail.comwrote:
Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />
I would recommend to use ADO.NET

Migrating from ADO to ADO.NET
http://msdn.microsoft.com/msdnmag/is...07/DataPoints/

Moving from ADO 2.5+to ADO.NET
http://www.ftponline.com/conferences...vGuide_c05.pdf
Nov 23 '07 #2
Already i know that! Would not be asking. I said that is a huege solution,
with a huege code lines of ADO. I try to optimizing the Web client
iterface....
"Alexey Smirnov" <al************@gmail.comescribió en el mensaje
news:1d**********************************@e6g2000p rf.googlegroups.com...
On Nov 23, 8:22 pm, "Harvey Triana" <eslender2...@hotmail.comwrote:
>Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />

I would recommend to use ADO.NET

Migrating from ADO to ADO.NET
http://msdn.microsoft.com/msdnmag/is...07/DataPoints/

Moving from ADO 2.5+to ADO.NET
http://www.ftponline.com/conferences...vGuide_c05.pdf

Nov 23 '07 #3
Looks like this line?

rs.Save (Response, 0);

You could try something like:
rs.Save (Response.OutputStream, 0);
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com

"Harvey Triana" wrote:
Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
.....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />

Nov 23 '07 #4
Hello Bromberg-

With Response.OutputStream I get the same error...
Maybe ASP Response is not the same or ASP.NET Response...
Thanks,
<Harvey Triana />
"Peter Bromberg [C# MVP]" <pb*******@yahoo.NoSpamMaam.comescribió en el
mensaje news:A4**********************************@microsof t.com...
Looks like this line?

rs.Save (Response, 0);

You could try something like:
rs.Save (Response.OutputStream, 0);
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com

"Harvey Triana" wrote:
>Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
.....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />


Nov 26 '07 #5
I try (looks fine):

Response.ContentType = "multipart/mixed";
Response.Clear();
Response.BufferOutput = true;
rs.Save(Response.OutputStream, ADODB.PersistFormatEnum.adPersistADTG);
Response.Flush();

The same, does not work!
-Is it possible transfer Recordset stream from ASP.NET?

<Harvey Triana />

"Peter Bromberg [C# MVP]" <pb*******@yahoo.NoSpamMaam.comescribió en el
mensaje news:A4**********************************@microsof t.com...
Looks like this line?

rs.Save (Response, 0);

You could try something like:
rs.Save (Response.OutputStream, 0);
--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com

"Harvey Triana" wrote:
>Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
.....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />


Nov 26 '07 #6
I think that I get it:
// server snip ...
Stream s = new Stream();
s.Type = StreamTypeEnum.adTypeBinary;
// rs is a filled Recordset
rs.Save(s, PersistFormatEnum.adPersistADTG);
rs.Close();
// send to client
Response.ContentType = "multipart/mixed"; //"text/xml" to adPersistXML
Response.Clear();
Response.BufferOutput = true;
Response.BinaryWrite((byte[])s.Read(s.Size));
s.Close();
Response.Flush();
}
....
' The client (ActiveX VB6):
Private Sub RecordsetTest()
Dim rs As Recordset: Set rs = New Recordset
rs.Open "http://....something.aspx"
' work with Recordset data
' ...
End Sub

Thanks to Peter, Alexey.
<Harvey Triana />

"Harvey Triana" <es**********@hotmail.comescribió en el mensaje
news:un**************@TK2MSFTNGP04.phx.gbl...
Hello -
I am migrating a large COM system solution to ASP.NET

To transfer data from Web to client this application uses streams of ADO
recordset, example:

Clasic ASP (VB Script):
<%
Dim Rs ' Recordset of ADO
' populate recordset
...
Response.ContentType = "multipart/mixed"
Rs.Save Response, 0 '//adPersistADTG
Rs.Close
Set Rs = Nothing
%>

client (VB6) side consumes this Recorset as:

Dim rs As Recordset
Set rs = New ADODB.Recordset
rs.Open URL
....
' When URL is the asp page.
--
From ASP.NET i am trying:

using ADODB;
....
public partial class RsSQL : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Recordset rs;
// populate recordset
...
Response.ContentType = "multipart/mixed";
rs.Save (Response, 0);
rs = null;
}

I get a HRESULT exeption in rs.Save (Response, 0)
Any suggestion?...

Thanks in advanced,
<HT />

Nov 27 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sandeep | last post by:
Hi all, I am new to the ADODB.Stream I am using following code lRecordset.Open "Select * from <some table-name>" 'this query return more than 1000 records dim lstream as new ADODB.stream...
0
by: vedwards | last post by:
I am trying to use images in my web form and I am trying to write thie executable to help transfer the gifs into the SQL column. Here is my code, I am getting an error. All help is appreciated....
11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
1
by: Victor Song | last post by:
Hi We are trying to stream a file using server.transfer rather than response.redirect. We have it working for IIS 5.0 but IIS 6.0 refusing to let us transfer the file. If we do the less...
7
by: fAnSKyer | last post by:
My method is use big buffersize, 512KB . And use StreamWriter.Write(bytes, 0, bytes.Length) to transfer to Server. It works, however, because the test file is below 512KB, but when I want...
2
by: Bonzol | last post by:
vb.net 2003 Windows application We have a Client/Server system set up by communicating through a TCPClient object. The server loops continuously using a tcplistener device and each time a client...
3
by: JohnM | last post by:
I can transfer from a query with DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "Filenam", CPath, True I would like to use a form for the user to select and order data then...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, The following code was suggested by one of the users in this newsgroup when a pdf file was requested by a user from an asp page. I used the similar code in my page and the very interesting...
4
by: Andrew Jackson | last post by:
I am writing a newsgroup client. I have the protocol figured out. But I get slow transfer speeds off any of the network objects read the data from For example one of the commands for a news...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.