look shani if u want to get the average or sum of the data u can don in this
way for eg u can copy this code and paste in notepad or microsoft front page
for asp applications usually i like to comment what i am doing in my code it
is a good coding practice for you
to remember what you done in the code for future upgradations


<%@ Language="vbscript"%>

<%
'decalre some variables here
'-------------------------------------------------
dim amt

'declare connections and recordset objects
'-------------------------------------------------
set ASConn = Server.CreateObject("ADODB.Connection")
Set asRS = Server.CreateObject("ADODB.Recordset")

'--------open connections-----------------------------
ASConn.Open  = "DSN=Your Dsn Name;Uid=rocky;Pwd=abcXYZ"
ASConn.CommandTimeout = 0

 strSQL = "SELECT * FROM Emp"

asRS.Open strSQL,ASConn

Do While Not asRS.EOF

If  asRS("Cnty") = "USD" Then

  amt = cdbl(asRS("Sal")) + cdbl(asRS("Comm"))

 asRS.MoveNext
else

   amt = cdbl(asRS("Sal"))
 Loop


    Response.Write "Records Inserted Successfully.."


   '--------Close connections---------------

    ASConn.Close
    asRS.close
    set asRS = Nothing

%>

I hope this is what u need always declare some varialbe and do ur operations
accordingly .if u need further assistance just reply me back

Bye and Take Care

Mohammed Mushtaq Ilyas

Software Developer

Dubai.U.A.E


On Sun, Sep 21, 2008 at 7:03 AM, shani <[EMAIL PROTECTED]> wrote:

>
> thank u mushtaq bhai , my problem is that  when i get any data from
> database through recordset ,i only  can display it on web page .for
> example that was numaric data .and i want to get the total or average
> of that data ..etc i mean how can i apply such opperrations on that
> data. ( i m not expert person so please describe in easy manner  )
> thank u.
>
> On Sep 18, 11:33 pm, "mushtaq ilyas" <[EMAIL PROTECTED]> wrote:
> > Hi shani
> > Can you be a little bit more precise what exactly you want to know so
> that i
> > can help you
> >
> >
> >
> > On Thu, Sep 18, 2008 at 4:36 PM, shani <[EMAIL PROTECTED]> wrote:
> >
> > > i m new person .i m making a web page wich can show result card .but i
> > > can not manage valus of variables . can i work with recordset as
> > > variable and control statments .please tell me .how can i do . thank
> > > you.- Hide quoted text -
> >
> > - Show quoted text -
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to