HighDots Forums  

is there nobody who can translate this injavascript?

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss is there nobody who can translate this injavascript? in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob
 
Posts: n/a

Default is there nobody who can translate this injavascript? - 07-10-2004 , 04:08 AM






Hi,

I'm converting a big program from VB to Jscript. That prigram uses RDS
object.
In VB, the code is: (works)
<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
ID="OBJDC" WIDTH="1" HEIGHT="1">
<PARAM NAME="SERVER" VALUE="http://10.0.0.181">
</OBJECT
.....
objdc.handler="msdfmap.handler"
objdc.connect="Data source=res"
objDC.ExecuteOptions = adcExecSync
objDC.FetchOptions = adcFetchBackground
objdc.sql = "select logon, count(uur) as totuur from studres where
cdate(dag)> date() group by logon having logon='" & lo & "'"
objDC.Refresh
if objdc.recordset.recordcount > 0 then
totu = objdc.recordset("totuur")
end if
.....


Code in Jscript (doesn't
work):error=:"document.getElementById("OBJDC").Rec ordset has no properties"
.....
document.getElementById("OBJDC").handler="msdfmap. handler"
document.getElementById("OBJDC").connect="Data source=res"
document.getElementById("OBJDC").ExecuteOptions = 1
document.getElementById("OBJDC").FetchOptions = 2
document.getElementById("OBJDC").SQL = "select logon, count(uur) as totuur
from studres where cdate(dag)> date() group by logon having logon='" + lo +
"';"
document.getElementById("OBJDC").Refresh
if (document.getElementById("OBJDC").Recordset.Record Count > 0 )
{ totu = document.getElementById("OBJDC").Recordset("totuur ") }
.....

By the way, can i use in Jscript a shorter way like:
OBJDC.Recordset.RecordCount (like
in VB)?
Thanks
Bob






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.