473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

how to display data from current time to before current time

Hi, can anyone help me [how to display data from current time to before current time].
when my program starts there is numbers and time will be display in the form of visual basic. it will run continuesly .My problem here is i dont know how to display the data 5min and before. Besides that i want to store this display for every 5 min and before. i already have database to store the number and time but not for every 5 min.should i create another database that just store data for 5min before. i already have one timer. Can i use another timer. plz help me. plz help with some example of coding
Apr 17 '08 #1
4 1772
debasisdas
8,127 Expert 4TB
Please pass more information.
Apr 17 '08 #2
Please pass more information.
This is my coding. My question here how i do i store information which been display in the Fillflex in to database.
i already has one database. is it ok if i add another one
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     FillFlex
  3.  
  4. End Sub
  5.  
  6. Private Sub FillFlex()
  7. On Error Resume Next
  8. Dim lAvg As Long, iCOunt As Integer
  9. Dim intTime As Date
  10.  
  11.     strSql = "SELECT CarID, TimeIn, TimeOut, TimeDuration, Speed" & _
  12.         " FROM Car_Details" ' WHERE CarTime >=cdate('2008-03-31 7:00')"
  13.  
  14.  
  15.     iCOunt = 0
  16.     FlxRs.Open strSql, DE.Conn, adOpenForwardOnly, adLockReadOnly
  17.     Flex.Rows = 1
  18.     If FlxRs.RecordCount > 0 Then
  19.  
  20.         For i = 1 To FlxRs.RecordCount
  21.             Flex.Rows = Flex.Rows + 1
  22.             Flex.TextMatrix(i, 0) = FlxRs(0)
  23.             Flex.TextMatrix(i, 1) = FlxRs(1)
  24.             Flex.TextMatrix(i, 2) = FlxRs(2)
  25.             Flex.TextMatrix(i, 3) = FlxRs(3)
  26.             If FlxRs(2).Value <> "" Then
  27.                 iCOunt = iCOunt + 1
  28.             End If
  29.             Flex.TextMatrix(i, 4) = FlxRs(4)
  30.  
  31.             FlxRs.MoveNext
  32.  
  33.             lAvg = lAvg + Flex.TextMatrix(i, 4) '= FlxRs(3)
  34.             lAvg = Math.Round(lAvg, 2)
  35.         Next i
  36.         lblNum.Caption = iCOunt
  37.         lblAverage.Caption = lAvg / lblNum
  38.         lblAverage.Caption = Math.Round(lblAverage.Caption, 2)
  39.     Else
  40.         lblNum.Caption = ""
  41.     End If
  42.     FlxRs.Close
  43.  
  44. End Sub
Apr 17 '08 #3
debasisdas
8,127 Expert 4TB
What is the problem with the code ?

is the Where clause is the part of your query ?
Apr 17 '08 #4
What is the problem with the code ?

is the Where clause is the part of your query ?
sorry the problem is not in coding but how i store average speed (u will notice in my coding) to database.
Apr 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Rich | last post by:
I'm sure it sounds kinda nutty to display 200 columns and 500,000 rows of data. But I have been pulling data from a Lotus Notes database into Sql Server for a while now, but Lotus Notes is...
34
by: kroger | last post by:
Hi. I am at a loss to decipher why the javascript on my web page: http://www.psych.nmsu.edu/~jkroger/lab/index.html does not display the date correctly in Firefox. Instead of "2005" for the...
7
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and...
3
by: matthewemiclea | last post by:
I am trying to display information in Access on a form that takes information from many different queries and puts them together on a spreadsheet or chart. Some specific info: The information I...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
5
by: libsfan01 | last post by:
Hi all Im trying to write a script that pulls data from another page (which is getting data from a db). The contents displayed on the db handling page (display.php) gets transferred through...
13
by: G | last post by:
Hello, Looking for opinions on a fairly simple task, new to ASP.net (C#) and want to make sure I do this as efficiently as possible. I have a web based form, and I need to run some SQL before...
22
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
11
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.