PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WXReplication and SQL Server
WXReplication and SQL Server
Iniciado por sivakrith, 23,jul. 2015 08:07 - No hay respuesta
Miembro registrado
10 mensajes
Publicado el 23,julio 2015 - 08:07
Hello,

I modified the WXReplication module by Fabrice Harari to access SQL Server database. Added the following connection method, if SQL Server

:m_cnxHFCSRealConnection..Provider = "SQLOLEDB"
:m_cnxHFCSRealConnection..User = INIRead("DB","User","sa",:m_ccsIniFile)
:m_cnxHFCSRealConnection..Password = INIRead("DB","Password","a123#",:m_ccsIniFile)
:m_cnxHFCSRealConnection..Server = INIRead("DB","Server","localhost",:m_ccsIniFile)
:m_cnxHFCSRealConnection..Database = INIRead("DB","DBName",cstDBName,:m_ccsIniFile)
//:m_cnxHFCSRealConnection..CryptMethod = hCryptRC5_16
:m_cnxHFCSRealConnection..Access= hOReadWrite
//MyConnection..ExtendedInfo = "CRYPT=RC5_16"
IF HOpenConnection(:m_cnxHFCSRealConnection)=False THEN
Info(HErrorInfo)
:SetHError()
RESULT False
END

It connects and works fine as far as new record (inserts) are concerned. I get error if I edit the same record, after WXREngine sends that data. ie I edit one record (tried with color file) and WXREngine sends that data and I again edit the same record, It doesn't get saved, instead the following error appears. The following error I get

Error at line 23 of Method hModify Process.
HModify function called.
OLE DB access error.
Error Number = 170147

Faiulure updating record in database

System error details:
Description = Query timeout expired
Source = Microsoft OLE DB Provider for SQL Server
SQL State = HYT00
Error Number = -2147467259 (0x800004005)

Description = Multiple-step OLE DB operation generated errors.Check each OLE DB status value, if available. No work was done.
Source = Microsoft OLE DB Provider for SQL Server
Error Number = -2147217887 (ox80040e21)

and the software quits. Hope some locking is happening on that particular record (by WXREngine) that prevents the WXReplication screen to update the record.

If I edit the same record, before the WXREngine sending the packets, there is no such problem.

As I'm new to WX products, I couldn't locate the error, which is causing this problem. Any suggestion to solve this problem is really appreciable.

Happiness Always
BKR Sivaprakash