no VFP9 / ActiveX access from SQL Express 2017 Server

Hello,
with another question about my Foxpro9 installation under W10pro64 I was helped quickly on this platform and hopefully someone has the right idea about this question:
I wanted to get away from the old WinXP and ported an old VFP9 program to SQL Express 2017 in W10pro.
So far I successfully installed SQL Express 2017 and on a Lan Client the VFP9 program ist working well.
Just on the Server itself the VFP program ist working only partially meaning that all "normal" data can be accessed just the calendar which is handled by dayview.ocx gives me a blank page with an error: "SQL server not found"
I connect VFP to SQL as user "sa" via ODBC and SQL Server Native Client 11.0
Apparently the activeX plugin makes a difference if data is via LAN rather than from the local host.
Does anybody have an idea what to do about this?
I already switched off windows firewall without change.
Thanks ahead for your replies!
Jochen WollenhauptAsked:
Who is Participating?

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

x
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.

Olaf DoschkeSoftware DeveloperCommented:
Yes, by default SQL (not only Express) is installed "hardened" to only localhost access.
Firewall is one thing to do.

Go into SQL Server Configuration Manager and enable TCP/IP protocol aka LAN access to the SQL Server instance:
SQL Server Configuration Manager SQLExpress Protocols.
Bye, Olaf.
Jochen WollenhauptAuthor Commented:
Thanks Olaf,
i have every protocol enabled in Configuration Manager.
But it is the other way around - Local Host has the problem LAN client is fine.
Olaf DoschkeSoftware DeveloperCommented:
What connection string are you using for the local connection?
This works for me for Windows Authentication: Driver={SQL Server Native Client 11.0};Server=(local);Database=...;Trusted_Connection=Yes; (besides that driver making problems with varchar(MAX), but not with connection.
And for SQL Server Authentication as "sa" it would still be Server=(local), but Uid=sa;Pwd=...;

If your connection gives -1, what does AERROR give you?

Bye, Olaf.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Jochen WollenhauptAuthor Commented:
Thanks again Olaf for helping out on a Sunday!

I am using SQL authentication
ConnectString: DSN=PManage;UID=sa;PWD=*******;APP=Fox....        .....;WSID=DESKTOP-5P8CTRL;DATABASE=Pmanage;
weitere Infos aus dem Log:
Das SQL-Objekt für PMANAGE wurde mit folgenden Einstellungen instanziiert:......DataBaseType = MSSQL|PathData = Table|DataBase = pmanage
CreateConnection: Die VFP-Connection im DBC pmanage_52O0HXN20 wurde erzeugt!
Verbindung zur DB wurde über VFP-Connection aufgebaut! Name:PMANAGE
Verbindungs-Einstellungen
(Connection) Asynchronous: .F.
(Connection) BatchMode: .T.
(Connection) ConnectBusy: .F.
ConnectTimeout: 0
DataSource: PManage
DisconnectRollback: .F.
DispLogin: 1
DispWarnings: .F.
IdleTimeOut: 0
ODBChdbc: 41347184
ODBChstmt: 124464048
PacketSize: 4096
Verbindung zur DB wurde über SQLCONNECT ohne VFP-Connection aufgebaut! DSN:pmanage USER:sa

not sure if connection is -1 and how can i request AERROR?

Did you get my mail, think i need professional help with this and further programming.

Thanks!
Olaf DoschkeSoftware DeveloperCommented:
Verbindung zur DB wurde über SQLCONNECT ohne VFP-Connection aufgebaut!
For all others: That means "Connection to the DB was established through SQLCONNECT without VFP connection.

I actually don't know what that means, as SQLCONNECT is a VFP function. It just works via ODBC DSN instead of using a connection string.

If you have a connection, you shouldn't get a problem with "SQL Server not found". The -1 would be return value of a SQLCONNECT or SQLSTRINGCONNECT call. If you don't do that you can't check it with AERROR of course, but this listing looks as if it established a connection.

Maybe the OCX is making its own connection and you have the problem outside with your other VFP code? You could try SQLEXEC using the ODBChstmt as nConnectionHandle parameter, or you can use it to establish another handle with SQLCONNECT(ODBChstmt), see help topic of VFPs SQLCONNECT.

Last not least: No,I didn't receive a mail from you, nor a PM here. Maybe try the EE PM system?

Bye, Olaf.

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
Jochen WollenhauptAuthor Commented:
Thanks! You were right, dayview.ocx was given its own connection with a hidden ini filde. Now it works!
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
SQL

From novice to tech pro — start learning today.