Solved

how to get recordset on asp

Posted on 2001-08-11
5
186 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 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