Improve company productivity with a Business Account.Sign Up

x
?
Solved

how to get recordset on asp

Posted on 2001-08-11
5
Medium Priority
?
193 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

608 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