-
Help needed!
Hi everyone!
I'm currently doing a project using VB.Net. I'm required to keep on accessing the database till there's a new entry of data into the database... Here, i used 2 timers... 1 timer to 'loop' thru the database.. After which it calls the 2nd timer... The 2nd timer will enabled the 1st timer again.. And this goes on until there's a new data...
The problem is i can only 'loop' thru this whole procedure about 9 times before it prompts me an error... The error line is "conn.open"...
I dont have the slightest idea what went wrong.. Anyone, help?
-
Would you please explain why you want to keep the connection open at first place?
-
I'm doing a project on a SMS service... I'll be storing the incoming & outgoing SMS msgs within the Access Database... Thus, I need to keep on 'looping' thru the database for any new incoming msgs...
Help help help help help... :confused:
-
Sorry, I still can't follow. I think you have to think about the design of the program a little more, anything you can do with a database may be accomplished using datasets and then updating the main database time to time. With datasets you dont need an open connection and you have a faster access.
-
All right, I'll tell u a full detail of my project...
I'm using a IP Phone to send SMS msgs... Here, I kept a database to store the incoming and outgoing msgs (Just like your Inbox and Outbox on ya handphone)...
Outbox:
As the msg is entered into the IP Phone and the user press "Send", the msg is extracted out into the "Outbox". Here, I would need my vb.net program to keep on searching thru the database for new msgs... If there is, I will activate my GSM Modem and send the msg to the final destination...
Inbox:
In this table, I would also need to have my VB.Net application to keep on scanning thru... Once there's a new incoming msg from another handphone user, my VB.Net would alert the IP Phone about the new msg...
In this case, I would prefer not to use dataset... As I feel that it would not get the accurate results that I wanted...
I've done the part which searches thru the database... Problem lies in that the VB.Net application can only goes thru the whole procedure abt 9 times before giving me an error... And I do not know why...
Hope this will give you a much clearer view of my problem...
-
So you mean that the part that messages are stored in your inbox and outbox database tables is external to your program? If yes, what kind of database it uses?
If that interface is not external to your program why dont you manage the incoming and outgoing messages and then store them in the database?
Anyway if your sole problem is that error after 9 times going through that procedure, you may send a sample code so I can check whats going on.
Sorry if i have been of no help.
-
Oh well... Its ok then... I'm unable to send u a sample code due to the constrains of my project.. But still, thanks alot...
:wave: