I have a VB Service but database not field with data

I have a  VB Service that every 20000 it will input datas in the database but after 20000 milliseconds it would not input anything on the sql database
so I don't know what to do

but when I would create this code with a windows application VB and click process it would input the data from dbf to sql but when it's running on a service it would not I will attach the code here so please help me thanks a lot :D
sourcecode.txt
kennethzxcAsked:
Who is Participating?
 
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
It means that the service is running under a different user which does not have access or could not find the database. It would be best to write the error to a file log to know what is going on.
0
 
Olaf DoschkeSoftware DeveloperCommented:
I can't help you with the code.

One detail, you query: DATETIME() - 10000, that means - 10000 seconds, not milliseconds.

So that should rather be DATETIME() - 10 for the last 10 seconds.

Problems of access rights can be because of running your Service as a System account, which is not having read access to LAN shares, for example.

Bye, Olaf.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.