PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD18] Reconnecting to OLE db
[WD18] Reconnecting to OLE db
Iniciado por guest, 23,oct. 2014 21:28 - 2 respuestas
Publicado el 23,octubre 2014 - 21:28
Our application uses a SQL Server 2014 database. When we get disconnected we will get this error

the following HyperFileSQL error occurred:
=============================
OLE DB access error.
Error Number = 170129

Failure opening file.
=============================

We solved it in WD 16 with the procedure below, but it stopped working after upgrading to WD 18

dsTest is Data Source
sTest is string = [
SELECT[TestID]
FROM [Test].[dbo].[Test]
WHERE TestID = 1
]

IF HExecuteSQLQuery(dsTest,CurrentConnection,hQueryWithoutCorrection,sTest) THEN
IF gbDisconnected = True THEN
gbDisconnected = False
// Info("Connection Re-Established")
END
RESULT True
ELSE
gbDisconnected = True
HConnectionClose(CurrentConnection)


HOpenConnection(CurrentConnection)
HChangeConnection("*",CurrentConnection)


Info("Connection was lost, try again")

RESULT False
END
Publicado el 23,octubre 2014 - 21:31
Instead of the procedure reconnecting us, the query just fails now even when the connection is re-established. HReconnect also does nothing. I've tried varying the code quite a bit but nothing seems to work.
Publicado el 23,octubre 2014 - 23:16
I just installed sqlServer 2014 express with (32/64bit combo)SQL Server Native Client 11.0 2011.110.2100.60 from microsoft and it works a charm once I defined User DSN.

But I didn't try wd18, only in wd/wb19 (in 64bit).

Also, working perfect with SQLServer 2012 Standard Edition.

I'd check all versions of OLEDB/ODBC drivers in your system, I guess it shouldn't be any problem as your wd16 might still use the old driver connection while the wd18 couldn't find out the right connector indeed.

HTH
King