|
| Lock error. MSSQL native driver. |
| Iniciado por Michael RUSLING, 28,oct. 2019 11:53 - 1 respuesta |
| |
| | | |
|
| |
Miembro registrado 2 mensajes |
|
| Publicado el 28,octubre 2019 - 11:53 |
Hope someone can help please.
MSSQL native driver (wd230sqlserver2_64.DLL flavour)
Why does this code: ====================== // Is there a roadside vehicle already? HReadSeekFirst(Vehicles, Registration, ivh.ITEM ) WHILE HOut(Vehicles) = False IF Vehicles.Registration <> ivh.ITEM THEN // Possibly don't need this. BREAK END IF Vehicles.PlateType ~= dbm.STATE THEN bVehicleFound = True BREAK END HReadNext(Vehicles, Registration) END // If the vehicle is not found. IF bVehicleFound = False THEN HReset(Vehicles) Vehicles.CreatedDate = SysDateTime() Vehicles.LastModifiedDate = SysDateTime() Vehicles.Registration = itm.ITEM Vehicles.PlateType = dbm.STATE Vehicles.Make = itm.MAKE Vehicles.Model = itm.MODEL Vehicles.YearOfManufacture = itm.BUILDYEAR Vehicles.Colour = "" Vehicles.Features = "" Vehicles.VehicleNotes = "" Vehicles.VehicleType = "" Vehicles.DFR = "" Vehicles.FleetID = "" IF HAdd(Vehicles) = False THEN WriteError(ErrorInfo(errCode),ErrorInfo(errMessage),"RS - VEHICLES record failed to create for rego: " + itm.ITEM + ". IVH: " + ivh.UUID + " ITM: " + ivh.ITM_UUID + " DBM: " + itm.DBM_UUID) RETURN END // and so on ======================
Produces the following error on the HADD(Vehicles): ====================== What happened? native SQLSERVER access error (lock). Error Number = 22 L'erreur suivante a été renvoyée par la base de données <utamssql.ultratune.com.au> : Numéro d'erreur = <-1>. Message d'erreur :
Description = [Microsoft][SQL Server Native Client 11.0][SQL Server]Lock request time out period exceeded. SQL State = 42000 Native Error Code = 1222
Error 2 Description = [Microsoft][SQL Server Native Client 11.0][SQL Server]The statement has been terminated. SQL State = 01000 Native Error Code = 3621
Error code: 70100 Level: non-fatal error WD55 error code: 100
Dump of the error of 'wd230hf64.dll' module (23.0.62.0). Identifier of detailed information (.err): 72802 Debugging information: Texte de la requête : INSERT INTO "Vehicles" ("CreatedDate","LastModifiedDate","Registration","Make","Model","YearOfManufacture","BodyTypeID","Colour","TransmissionID","DriveTypeID","ModificationID","Features","Inactive","VehicleNotes","VehicleType","DFR","PlateType","FleetID") VALUES ( , , , , , , , , , , , , , , , , , ) Nombre de paramètres : =18 Paramètre 0 : Type WLangage : 26 = <20191028164035069> Paramètre 1 : Type WLangage : 26 = <20191028164035069> Paramètre 2 : Type WLangage : 19 = <CZN20Q> Paramètre 3 : Type WLangage : 19 = <LEXUS> Paramètre 4 : Type WLangage : 19 = <NX200T> Paramètre 5 : Type WLangage : 19 = <2015> Paramètre 6 : Type WLangage : 8 = <0> Paramètre 7 : Type WLangage : 19 = <> Paramètre 8 : Type WLangage : 8 = <0> Paramètre 9 : Type WLangage : 8 = <0> Paramètre 10 : Type WLangage : 8 = <0> Paramètre 11 : Type WLangage : 19 = <> Paramètre 12 : Type WLangage : 1 = <0> Paramètre 13 : Type WLangage : 19 = <> Paramètre 14 : Type WLangage : 19 = <> Paramètre 15 : Type WLangage : 19 = <> Paramètre 16 : Type WLangage : 19 = <NSW> Paramètre 17 : Type WLangage : 19 = <>
IEWDSQS=107.3 Module=<WDSQS> Version=<23.0.2.0> Couche client : C:\windows\SYSTEM32\sqlncli11.dll Provider : WinDevSQLServer Utilisateur : Builder Source de données : utamssql.ultratune.com.au Base de données : roadside Timeout de connexion : 30 Timeout de commande : 30 Unicode supporté : 0 Code page du WL : 1252 Code page de la connexion : 1252 SQLRETURN = SQL_ERROR HANDLE VALUE = 1352675635584 HANDLE TYPE = 3 Additional Information: EIT_INFOCLIENT : <11.00.7462> EIT_INFOSERVEUR : <13.00.5426> EIT_BASECODE : <1222> EIT_NATIVECODE : <22> EIT_LOGICALTABLENAME : <Vehicles> ==========================
I have tried HAdd(Vehicles, hNoLock) , but no difference. The same code happily ran all day every day when ODBC (not native driver). I except there are differences etc, but this is quiet strange to me being just HReset() then HAdd(). The ID of the created record is required later in the code, to associate a child of the vehicle.
-- Michael Rusling Rusling Programming Services |
| |
| |
| | | |
|
| | |
| |
| Publicado el 31,octubre 2019 - 12:24 |
Hello. MySQL specific features: https://help.windev.com/en-US/…
I think you can not use HF WL constants to lock MySql, PostgreSql and other Native connectors. SqlLock() must be used. See help.
Regards ! |
| |
| |
| | | |
|
| | | | |
| | |
|