Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 3 Jahren, 8 Monaten
Letzter Beitrag:
vor 3 Jahren, 8 Monaten
Beteiligte Autoren:
FMUser2, Kingdr

[WD18] Reconnecting to OLE db

Startbeitrag von FMUser2 am 23.10.2014 19: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

Antworten:

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.

von FMUser2 - am 23.10.2014 19:31
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

von Kingdr - am 23.10.2014 21:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.