Solved

how to get recordset on asp

Posted on 2001-08-11
5
187 Views
Last Modified: 2010-04-06
I have build a aumation object,I want to send a recordset
to asp script with it.
I have build the library as folow
funciton getlist:olevariant
begin
adoquery.close;
adoquery.open;
result:=adoquery.recordset;
end;

then How can I do in asp script
0
Comment
Question by:gutian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 6375391
Something like

<%
Set rs = getlist
%>
0
 

Author Comment

by:gutian
ID: 6375417
but I cannot get the result,so I change the server source
as the follow:
procedure CreateVarArrayFromDataset(var varResultSet: OleVariant; ADataset : TDataset);
var
  m : Integer;
  nRecords, nColumns, nCurRec : Integer;
begin
  nColumns := Max(0, ADataset.FieldCount-1);
  nRecords := Max(0, ADataset.RecordCount);
  varResultSet := VarArrayCreate([0, nColumns, 0, nRecords], varVariant);
  for m := 0 to nColumns do
    varResultSet[m, 0] := ADataset.Fields[m].DisplayLabel;
  ADataset.First;
  nCurRec := 1;
  while not ADataset.Eof do
  begin
    for m := 0 to nColumns do
      varResultSet[m, nCurRec] := ADataset.Fields[m].Value;
    ADataset.Next;
    Inc(nCurRec);
  end;
end;


function TEasyMail.GetAddressList(UserName: OleVariant): OleVariant;
begin
if GetDataSvr then
    begin
        with DmSysData.AdqGetUsr do
            begin
                close;
                sql.Clear;
                sql.Add('select * from hyjh_mail_addressbook where user_id=:username');
                parameters.ParamByName('username').value:=username;
                try
                    open;
                    FRecordCount:=RecordCount;
                    FColumnCount:=FieldCount;
                    CreateVarArrayFromDataset(Result,DmSysData.AdqGetUsr as TdataSet);
                except
                    execsql;
                    result:='';
                end;
            end;
            result:='';
    end
else
    result:='';
end;

but how can I get the reecordset
0
 

Author Comment

by:gutian
ID: 6382916
I have resolve the problem,thanks for  Epsylon'kind answer.
But  Epsylon' answer is not correct,can I ask you another
question.
I want to send mail from web,I wannor how to manage the attachments on web.
BTW  I have done the upload file.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8741657
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To be PAQ/Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 8822529
Per recommendation,

PashaMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question