Posts by siga0984 • 649 points
14 posts
-
2
votes1
answer259
viewsA: How to create a Function that calculates CRC16 in SQL Server?
I found exactly the function you are looking for, but the source is in C -- You need to "just" convert to MSSQL functions ... I hope it will be useful to you.…
-
2
votes1
answer671
viewsA: SQL save and return Base64 image
The Dbaccess - Relational Data Access Gateway -- used by Protheus to read and write data in the approved Databases -- until recently did not allow reading LOB or similar fields directly by Query. A…
-
1
votes1
answer117
viewsA: Query validation based field update
I think your program is using the alias "SE2" for Query ... your program opens the search query in Alias SE2, saved in the variable cAlias, keeps the Query open, and ends up trying to do the search…
-
0
votes3
answers240
viewsA: How to read DBF generated in Protheus in Visual Fox Pro?
The format used by a DBF file can be identified by opening the file with a hexadecimal viewer by checking the hexadecimal value of the first byte of the file. The formats used in Protheus are: 0x03…
-
0
votes2
answers60
viewsA: Verifying time of execution of a call in ADVPL
The more elegant alternative would be not to calculate the time difference using the functions time() and elaptime(), but only the function seconds(). This function returns the number of seconds…
-
2
votes2
answers108
viewsA: Does the use of the "alias-assignment" '->' operation interfere with the performance of the application?
Let’s see: use/abuse -> in Clipper or derivatives (such as Harbour or ADVPL) generates some measurable impact on application performance? Answer: There is time difference, but we are talking…
-
4
votes1
answer775
viewsA: How do you read the ADVPL profiler report?
what the field M indicates? Why I have that GROUNDHOG has an M of 6.422? R: M indicates the time of the largest call. For example, the GROUNDHOG function was called 210 times, consuming a total time…
-
7
votes1
answer328
viewsA: How to analyze the performance impact of a code snippet in ADVPL?
Superficially analyzing the code, whether it is STATIC FUNCTION linhaJson() is often called, from within the same execution context, REMOVE lines : ZX1->(dbGoTop()) e ZX1->(dbCloseArea()). You…
-
1
votes4
answers829
viewsA: Compile-time type checking ADVPL
With the release of the new version of the 64-bit TOTVS Application Server, called "Lobo Guará", it will be possible to program using a new Advpl code, differentiated by the file extension, with…
-
3
votes1
answer245
viewsA: I have a problem loading a field using a function in ADVPL
Query is probably not bringing any record, due to mounting one or two conditions in the Query: cQuery += " AND SB8.D_E_L_E_T_ = '' " When comparing the SB8.D_E_L_E_T_field, compare it to a string…
-
3
votes1
answer172
viewsA: I have this mistake in advpl
I believe the cause of the error lies in the fact that you are re-executing a PREPARE ENVIRONMENT, within a function ( U_TSTREL ) that is being called from a Menu or Browse option, where you already…
-
1
votes2
answers349
viewsA: Load the contents of one <TD> onto another <TD> ADVPL ASP
In its Html code, Javascript is already being used to validate the invoice key ( javacript:validate() function, fired after the loss of focus in the "NF Key" field), and the "total" validation…
-
1
votes1
answer1622
viewsA: Send file using Httppost - ADVPL
For the use of the function HTTPPost() for sending an XML file, initially the XML file must be loaded into memory in a character variable, which must be specified as parameter in cPostParms -- this…
-
3
votes1
answer1116
viewsA: Read a DBMS Procedure in ADVPL
In Advpl there are three ways to run a Statement on an SGDB through Dbaccess: TCSPEXEC() -- To perform stored procedures with one or more Input and/or output parameters (Return is a list of…