try changing Response.Write "ttnm" to Response.Write (ttnm)
On 27 Sep, 12:51, shani <[EMAIL PROTECTED]> wrote:
> ilyas bai aslamoalikum
> i try my best to understand ur code .but fail the reason may be is
>
> that i dont like VB or not much familar with it.i could,nt
> understand
>
> how u assign recordset values [ cdbl(asRS("Sal")) +
>
> cdbl(asRS("Comm")) ] to a [ amt] variable.
> i use lessDSN connection and sending u code which i m useing .and i
>
> want to assign record set values [(rsResult("Marks")) ] to a
> variable
>
> [ttnm ].
> please tell simle modification. in my code .also should kept in mind
>
> that i am also feeling difficulty in use VB loops.and control
> statments
>
> which i think are more difficult than other language. i want easy
>
> control .
>
> <%
>
> Dim adoCon,rsResult,strSQL,ttnm,amt
>
> Set adoCon = Server.CreateObject("ADODB.Connection")
> adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
>
> Server.MapPath("Resultbook.mdb")
> Set rsResult = Server.CreateObject("ADODB.Recordset")
> strSQL = "SELECT tblmarks.Subject, tblmarks.Marks FROM tblMarks;"
> rsResult.Open strSQL, adoCon
>
> Do While not rsResult.EOF
> ttnm = rsResult("Marks")
> amt = ttnm + ttnm
>
> Response.Write ("<br>")
> Response.Write (rsResult("Subject"))
> Response.Write ("<br>")
> Response.Write <i>(rsResult("Marks")) </i>
> Response.Write ("<br>")
> Response.Write ("Total Marks")
> Response.Write ("<br>")
> Response.Write "ttnm"
> Response.Write ("<br>")
>
> rsResult.MoveNext
> Loop
>
> rsResult.Close
> Set rsResult = Nothing
> Set adoCon = Nothing
> %>
>
> On Sep 22, 5:31 pm, shani <[EMAIL PROTECTED]> wrote:
>
> > thank u bai , i will must use this code and then tell u result.
>
> > On Sep 21, 6:58 pm, "mushtaq ilyas" <[EMAIL PROTECTED]> wrote:
>
> > > 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
> > > foraspapplications 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 uneedalways declare some varialbe and do ur operations
> > > accordingly .if uneedfurther 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
> > > > > canhelpyou
>
> > > > > On Thu, Sep 18, 2008 at4: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 -- Hide quoted text -
>
> > > - Show quoted text -- 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
-~----------~----~----~----~------~----~------~--~---