Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jjoya
Starting Member
5 Posts |
Posted - 2009-11-22 : 20:15:38
|
Hello everyone,is there anyone knows about trigger the vb 6.0 apps if SQL 2000 database has new data inserted on table without affecting the Performance of the database.i have sample below codes about trigger.but im using a TIMER to update and select if has a new added data on the table.My timer interval every 5 seconds that why my database affecting and higher performance every running of timer.Private Sub Timer2_Timer()Dim ssql As StringDim rs As New ADODB.Recordsetssql = "SELECT * from Auto_ModuleSummary WHERE Tester like '%al3%' and (TestDate > DATEADD(dd, - 1, GETDATE())) AND (TestDate <= GETDATE())ORDER BY ID DESC"Set rs = Nothingrs.CursorLocation = adUseClientrs.Open ssql, ConDBSet Datagridmodsummary3.DataSource = rstxtsnumber.Text = Datagridmodsummary3.Columns(1)Call FillValuesDim count As IntegerIf rsLookUpTables.State = 1 Then rsLookUpTables.ClosersLookUpTables.Open "Select Serial_No from Mdc_History where Serial_No like '%" + Text2.Text + "%'", ConDB, adOpenStatic, adLockOptimisticcount = rsLookUpTables.RecordCount If rsLookUpTables.RecordCount = 0 Then Call Command2_Click Else End IfEnd SubHope you Help me about this problemUsing timer for every 5 seconds without affecting database performance.Trigger VB 6.0 Apps if new data on SQL DB |
|
jjoya
Starting Member
5 Posts |
Posted - 2009-12-06 : 22:43:53
|
Please Help.... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-07 : 02:47:29
|
Why is it for only 5 seconds?Cant you increase the time interval?MadhivananFailing to plan is Planning to fail |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-07 : 10:42:43
|
what does the vb app do when new records appear? |
|
|
jjoya
Starting Member
5 Posts |
Posted - 2009-12-08 : 23:51:56
|
for madhivanan:Why is it for only 5 seconds? - to pick-up my record on the sql database to my vb6 apps (datagrid). on the datagrid, system verify if the serial number is already transacted or not. the timer runs every second. you know how to my datagrid automatic update once the sql table has new data inserted then automatic pick-up to my datagrid either no timer runs every 5 seconds.Cant you increase the time interval? - if i increase the timer, it means my datagrid waiting for a long timer before it update.to russell:what does the vb app do when new records appear? - is there any possible to update my datagrid (vb6.0) once the database table has new data inserted then my datagrid automatically update also.Please Help:Thanks,Joey |
|
|
jjoya
Starting Member
5 Posts |
Posted - 2009-12-11 : 00:34:25
|
Hello. Please help...Thanks Much! |
|
|
|
|
|