Connecting to online SQL server database via Delphi application

Hi everyone, I'm trying to connect to a SQL database located on my web server using my Delphi application.    Every of my customers using this application will have to be able to acces this database from their company without them having to configure something on their computers.

I'm not sure how to do this and would need an expert help on this matter, currently I'm using this connection string for local databases but it doesn't seem to work when I use IP address for the server.

ConnectString := 'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=' + vServer + ';Initial Catalog=' + vTable + ';'
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have you checked firewalls on both sides to ensure the SQL traffic can be passed through?  It should work, but most web servers have blocked all traffic except specified ports.

In the above statement, 'vTable' should be the Database name, not the table name, correct?
One follow up - you will probably not be able to use Integrated security, as your users would not likely have local windows or domain accounts on your web server.  You'll need to use individual user names & passwords.

 DataConnection = "Provider=SQLOLEDB.1;Initial Catalog=;Data Source=;UID=;PWD=;Connect Timeout=15"
Buropro-CitationAuthor Commented:
Removing the SSPI helped, I'm now able to see a log event in the sql server management studio.   Problem I'm now getting an error, I'm using UID=SA;PWD=SA; but I'm getting a 18456 error (gravity 14, state 8) which is clearly a password error even though SA is the right password.
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Do you get the same error if you attempt to connect / test in another method?  Try creating a .udl connect with the same info.

Name the file test.udl, and it should contain:
; Everything after this line is an OLE DB initstring
Provider=SQLOLEDB.1;User ID=sa;Password = password; Data Source=server;Persist Security Info=False

Then when you double click on the file, it will allow you to test the connectioh

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Also check the router for port forwarding on the location of the server...
make a test application with only the connectionString editable. Something like a form, a memo (with sonnection string( and a button that adds connection string to the database component from the memo. Also chek out hat the server does not use an instance.
Do not forget to use a connection string from
CodedKSenior Software EngineerCommented:
Hi Informatique-hamel,
Check my PAQ here:

I explain how to connect to remote SQL Server.

Hope this helps.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.