Jump to content

Blindbird

Members
  • Posts

    2
  • Joined

  • Last visited

Blindbird's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Ya like Yahweh said, it's a data type problem that is not in string form but another, and while displaying it on page, vbscript plays the unnecessary role, if you convert that data type to sting, it will display correctly.Better if you cast your variable into string while opening a recordset. <%Dim objCon, objRs , strSqlSet objCon = Server.CreateObject("ADODB.Connection")Set objRs = Server.CreateObject("ADODB.Recordset")strSql = "SELECT CAST(myCurrencyField AS VARCHAR(20)) AS myCurrencyField FROM myTable"objCon.Open "Provider=SQLOLEDB.1..........your connection"objRs.Open strSql, objCon' this will display your currency field accuratelyResponse.Write "<b><u>Currency</u></b>" & "<br><br>"Do Whie Not objRs.Eof Response.Write objRs("myCurrencyField") Response.Write "<br>" objRs.MoveNextLoop%> Try out this also
  2. I think there is no more objects like you are saying, Session itself doesnot contains any object, it's only a memory in server computer, Like an simple example Dim objCon Set objCon = Server.CreateObject("ADODB.Connection") Set Session("objCon") = objCon now u are using this session object as your object, it is easy if you have to go through childs of that object. now we can use Session("objCon").Open "MYCONNECTION STRING" Session("objCon").Execute "DELETE FROM MYTABLE"In crystal reports, we need class for crystal report, i.e. you have to install crystal report application in your computer. Now it supports few classes. so create the object of that class and save it to session so that you can go with it from every page.>>>>>>>>>>>>>>>>>>>>>>>>>>>>
×
×
  • Create New...