View Single Post
  #1 (permalink)  
Old October 19th, 2005, 02:39 PM
neo_jakey neo_jakey is offline
Authorized User
 
Join Date: Jun 2003
Location: Mexico City, Distrito Federal, Mexico.
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic variables

Hi All,

I am trying to produce dynamic variables depending on the entries in my database. I have 2 entries for test purposes in this moment.

<%
rsStart = "10/19/2005 00:00:00 AM"
rsEnd = "10/19/2005 11:59:59 PM"

Set oRSbn=Server.CreateObject("ADODB.recordset")
strSQL = "SELECT * FROM CardTransHistory" _
       & " WHERE TransDate BETWEEN #" & rsStart & "# AND #" & rsEnd & "#" _
       & " AND CardId = 'Card#=" & rsNum & "';"
oRSbn.open strSQL, oConn
oRSbn.MoveFirst
rsTransCnt = 1
Do While NOT oRSbn.EOF
rsHours+rsTransCnt = oRSbn("TransDate")
rsTransCnt = rsTransCnt + 1
oRSbn.movenext
Loop
Response.Write rsHours1
Response.Write rsHours2
TotalHoursWorked = rsHours2 - rsHours
Response.Write TotalHoursWorked %>

However it fails on the bold line, indicated above.
I am new to dynamic variables and am really stuck.

Any help would be greatly received.

Many Thanks,

neo_jakey
Reply With Quote