Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: TSQLConnection to MSSQL database doesn't work into a service



Permlink Replies: 2 - Last Post: May 16, 2017 7:02 AM Last Post By: Eugenio Monti Threads: [ Previous | Next ]
Eugenio Monti

Posts: 3
Registered: 3/16/00
TSQLConnection to MSSQL database doesn't work into a service
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 16, 2017 2:30 AM
Hi,
I have a simple piece of code that creates a TSQLConnection object, initalize it, load params from a file and finally make "Connected=true".
If I run that code in a form application it works very well but If i try to execute into "ServiceExecute" method of a service application,it
gives "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path." error.
I tried the same path using MySQL and I have NO problem either in form app and in service app.
What does MSSQL wants to run in a service?
Thanks in advance. Bye
Jan Dijkstra

Posts: 206
Registered: 11/4/99
Re: TSQLConnection to MSSQL database doesn't work into a service
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 16, 2017 4:02 AM   in response to: Eugenio Monti in response to: Eugenio Monti
Eugenio Monti wrote:
Hi,
I have a simple piece of code that creates a TSQLConnection object, initalize it, load params from a file and finally make "Connected=true".
If I run that code in a form application it works very well but If i try to execute into "ServiceExecute" method of a service application,it
gives "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path." error.
I tried the same path using MySQL and I have NO problem either in form app and in service app.
What does MSSQL wants to run in a service?
Thanks in advance. Bye

What's the account you setup to run your service with? If it's the default (which is Local System), then it may have insufficient rights to access some folders or files.
Eugenio Monti

Posts: 3
Registered: 3/16/00
Re: TSQLConnection to MSSQL database doesn't work into a service
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 16, 2017 7:02 AM   in response to: Jan Dijkstra in response to: Jan Dijkstra
What's the account you setup to run your service with? If it's the default (which is Local System), then it may have insufficient rights to access some folders or files.

I tried everything:
- my logged user
- NT AUTHORITY\LocalService
- NT AUTHORITY\NetworkService
but...the same error!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02