Reseting table handler in MSACCESS database

aswathy

New member
Joined
Oct 4, 2006
Messages
2
Programming Experience
Beginner
Hi,My application demands storage of data acquired throgh COM in every one minute interval and storing it in the access database. It has to be appended in every one minute for one hour with time stamp. After one hour ie, 60th record it has to replace the first record and next minute second record and so on. I could establish the connection with the data base and store data using INSERT INTO command and oledbcommand from vb.net. Now my problem is how to roll back to the first record and replace each record one afer another . I tried many sql commands including REPLACE which did not work. I doubt the syntax i used must be wrong. Can any body could through some light on this. Pl inform me the correct method i should use for this purpose with correct syntax. If necessary i will attach the full code also.Thanksaswathy
 
Do you want to clear the table once you've filled it or just overwrite the existing records one at a time? If it's the latter then you'd simply use an UPDATE statement.
 
I agree. Fill a table with all the relevant columns plus a column that is numbered 0 to 59, then use this statement:

UPDATE tblCOMData SET field1 = value1, field2 = value2 ... WHERE minuteColumn = (the current minute)
 
Back
Top