topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
function that return the temp directory of the logged user | Thans
Philippe Jacquet |
function that return the temp directory of the logged user | Philippe,
Enrico's solution won't always work. Here is a more comprehensive solution.
James
[code:3bae7a3e]//--- Returns temporary directory name without trailing backslash
function getTempDir()
local cDir := GetEnv("TEMP")
if empty(cDir)
cDir := GetEnv("TMP")
... |
function that return the temp directory of the logged user | Hi James.
I think your code is incomplete. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
It may so occur that there are defined two variables TEMP and TMP in environment. For example TEMP=C:\TEMP and TMP=C:\TMP while directory C:\TEMP does not exist but directory C:\TMP do... |
function that return the temp directory of the logged user | Maybe something as the following <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
//--- Returns temporary directory name without trailing backslash
function GetTempDir()
local cTargetDir, cTempDir, cTmpDir
local lTempExist, lTmpExist
cTempDir := GetEnv( "TEMP" )
cTmpDir... |
function that return the temp directory of the logged user | Vladimir,
Thanks for the improvement.
James |
function that return the temp directory of the logged user | Also the statement
if ( Right( cTempDir, 1 ) == "\" )
cTempDir := SubStr( cTempDir, 1, Len( cTempDir ) - 1 )
endif
is not correct enough. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
The following would be more correct.
if ( ( Right( cTempDir, 1 ) == "\" ) .... |
function that return the temp directory of the logged user | [quote="James Bott":vjw7efpf]Enrico's solution won't always work.[/quote:vjw7efpf]
I used GetEnv( "TEMP" ) for at least 10 years and got no reports about problems with it.
EMG |
function that return the temp directory of the logged user | Enrico Maria
[quote:29veq1l8]I used GetEnv( "TEMP" ) for at least 10 years and got no reports about problems with it. [/quote:29veq1l8]
It is very boring! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
function that return the temp directory of the logged user | Enrico,
Yea, like Valdimir says, thats too easy.
I suppose if getEnv("TEMP") returns a blank string then any temp files will just be written to the current directory. There probably won't be any error message. I'm not saying there is anything wrong with that, just that you probably wouldn't know if it was not working... |
function that return the temp directory of the logged user | If GetEnv( "TEMP" ) should have return an empty string then I would consider more correct to put temporary files in the current directory rather than in WINDOWS directory.
EMG |
function that return the temp directory of the logged user | Enrico,
I agree. I didn't write the function I posted, I just had it in my notes. I never really carefully looked at what it was doing.
James |
function that return the temp directory of the logged user | Enrico Mario
[quote:157ttlnr]I would consider more correct to put temporary files in the current directory[/quote:157ttlnr]
Buon girno.
In the current directory or in a directory from which your program started?
Vladimir Grigoriev |
function that return the temp directory of the logged user | In the current directory (that is the one from which my program started, in my environment).
EMG |
function that return the temp directory of the logged user | Enrico,
There is a downside to putting temp files in the current directory when the program is being run from a server. This slows down the application.
It might be better (when TEMP isn't found) to check for c:\temp and if it doesn't exist, then create it and use this instead.
I know most Windows versions have a c:... |
function that return the temp directory of the logged user | Agreed.
EMG |
function that return the temp directory of the logged user | After reading I can conclude that idea to have a program parameter which specifies a temp directory (for example, MyProg /TMP:c:\somepath) deserves consideration. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
function that return the temp directory of the logged user | Or you can use the following API call to get the windows temp folder IF they have access to it.
function get_temp()
local tbuffer:=space(256)
gettemppath(256,@tbuffer)
tbuffer := LEFT(tbuffer,AT(CHR(0),tbuffer)-1)
return(tbuffer)
DLL32 Function GetTempPath( bufferlen as LONG, tbuffer AS LPSTR) AS LONG ;
PASCAL FROM ... |
function to build filters | Hello friends,
I'm looking for a function to filter in a dbf, that allows for various conditions, and or in the subsequent conditions, different operators, etc., so that the user can be dynamically building the filter.
Is there anything ?. Thank you very much and happy 2015. |
function to build filters | [code=fw:6lyhabrt]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> ... <span style="color: #0000ff;">TO</span> ... <span style="color: #00C800;">FOR</span> cCondition</div>[/code:6lyhabrt]
EMG |
function to build filters | I mean the dialog with field, operator and condition... function that processs and verifies the condition, operator and field type... |
function to build filters | Lucas,
I don't know, sorry.
EMG |
function to build filters | No problem.
It also can be paid. |
function to build filters | Have you checked fivedbu ? |
function to build filters | Yes but that routine is not finished, Does not verify expresions, field types and operators... |
function to build filters | Lucas,
you can test them using TRY/CATCH/END.
EMG |
function to build filters | Two years ago I asked to insert on xbrowse a small filter to use on xbrowse easy.
After some work ( it is was not a interest for anyone) I made a small Class Tfilter to use with xbrowse
[img:2pwjwdrw]http://www.eoeo.it/wp-content/uploads/2015/01/FILTER.jpg[/img:2pwjwdrw]
the procedure need only the o... |
function to build filters | Yes please |
function to build filters | Can you send me the class?
That's exactly what I'm looking for a long time.
Thank You!
Manfred |
function to build filters | Me too please <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> .
Or maybe it´s better to post in the forums, as the Rating class.
In my opinion, this class TFilter is mo... |
function to build filters | this week I recompiled my sources and I found a strange error nEditTypes .. I dont Know I asked to Nages |
function to build filters | Sorry ...I found the error give me this tonight to recompiled all sources and make some tries ... |
function to build filters | Great, thank you Silvio.
If you post here the samples, several people can help to test it. |
function to build filters | I sent all sources to Antonio upload on downlist folder
Tfilter class
FileManager
and two samples
It is easy to undestand it .
oFilter:= TFilter():New(aCampos,aTitulos,aTipos, cDbf,oGrid,lNew,cSection)
oFilter:Dialog()
oFilter:Activate()
cFilter := oFilter:SetFilter()
IF ! Empty( cFilte... |
function to build filters | Thank You Silvio!!!
I wait for the sources!!!! |
function to build filters | <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=29924&p=170166#p170166">viewtopic.php?f=3&t=29924&p=170166#p170166</a><!-- l --> |
function to create a string | Is there a function to save a string like "30/60/90" from an array?
i.e. to create an array I made aData := hb_ATokens(cString,"/")
Does the reverse function exist? |
function to create a string | No conozco una que te devuelva la inversa, pero podrias usar algo asi:
[code=fw:3n97akly]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span styl... |
function to create a string | [code=fw:3ic7k52r]<div class="fw" id="{CB}" style="font-family: monospace;">cStr := FW_ArrayAsList<span style="color: #000000;">(</span> aData, <span style="color: #000000;">[</span>cDelim<span style="color: #000000;">]</span>, <span style="color: #000000;">[</span>lTrim<span style="color: #000000;">	... |
function to create a string | I was convinced there was a function that did the opposite but I really didn't remember, thanks everyone for the help |
function to create a string | Muchas gracias Mr Rao...
Desde que version de Fivewin existen esas funciones? |
function to create a string | February 2013.
More than 10 years back.
These functions are in \source\function\valtostr.prg.
These functions are extensively used by FWH in its own modules (around 16 modules) |
function to create a string | Excelente! Muchas gracias Mr. Rao!! |
function to create tables for Access and MySQL | Hello,
As the sintax is different, is there a function to créate tables for either Access or MySQL?.
Thank you. |
function to create tables for Access and MySQL | Lucas,
[quote="lucasdebeltran":2mx2rbj3]Hello,
As the sintax is different, is there a function to créate tables for either Access or MySQL?.
Thank you.[/quote:2mx2rbj3]
This is the function I'm using:
[code=fw:2mx2rbj3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</... |
function to create tables for Access and MySQL | Enrico,
Where are functions STrim(), NTrim() and SqlExec() ? thanks |
function to create tables for Access and MySQL | Antonio,
[quote="Antonio Linares":1s0oi8p4]Enrico,
Where are functions STrim(), NTrim() and SqlExec() ? thanks[/quote:1s0oi8p4]
[code=fw:1s0oi8p4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> STRIM<span style="color: #000000;">(</span> cStr, nChr <span sty... |
function to create tables for Access and MySQL | Mr. Enrico,
Thank you very much, but I always get, either MYSQL or MSACCESS:
Incorrect arguments, out of range or in conflict with others. (0x800A0BB9)
What I am doing wrong?.
Thank you. |
function to create tables for Access and MySQL | Lucas,
[quote="lucasdebeltran":pj5796g4]Mr. Enrico,
Thank you very much, but I always get, either MYSQL or MSACCESS:
Incorrect arguments, out of range or in conflict with others. (0x800A0BB9)
What I am doing wrong?.
Thank you.[/quote:pj5796g4]
Please, show me how are you calling the function. A reduced and self-... |
function to create tables for Access and MySQL | Mr. Enrico,
I have to open the connection using oCn2:CursorLocation = adUseClient.
I was using my own Exec function, but in yours is that set on. Now it is working fine.
Also, in MySQL, when creating a table, this sets up auto_increment feature and it is managed by MySQL:
cQuery += "ID INTEGER NOT NULL... |
function to create tables for Access and MySQL | [quote="lucasdebeltran":2kf8666k]Mr. Enrico,
I have to open the connection using oCn2:CursorLocation = adUseClient.
I was using my own Exec function, but in yours is that set on. Now it is working fine.[/quote:2kf8666k]
I don't understand but ok, that's good. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif"... |
function to create tables for Access and MySQL | Mr. Enrico,
Thank you, but with your function the result is the same, with Access and ADO autoincrement fields are not managed.
With MySQL is fine.
Anything else has to be done?.
Thanks. |
function to create tables for Access and MySQL | Lucas
What provider do you use to connect to Mysql with ADO ?
Richard |
function to create tables for Access and MySQL | Lucas,
[quote="lucasdebeltran":pn54g10g]Mr. Enrico,
Thank you, but with your function the result is the same, with Access and ADO autoincrement fields are not managed.
With MySQL is fine.
Anything else has to be done?.
Thanks.[/quote:pn54g10g]
My function works fine here, even with Access. As I already said, I ne... |
function to create tables for Access and MySQL | Mr. Enrico,
Thank you very much. Your function works perfect. There is a bug at TDataRow managing Access numeric fields with decimals, not related to your function.
Best regards |
function to create tables for Access and MySQL | [quote="lucasdebeltran":zmpk2j3n]Mr. Enrico,
Thank you very much. Your function works perfect. There is a bug at TDataRow managing Access numeric fields with decimals, not related to your function.
Best regards[/quote:zmpk2j3n]
Yes, in the case of blank row and it was fixed. You already have the fixed version with yo... |
function to create tables for Access and MySQL | Mr. Nages,
In the datarow.prg you sent me on 15th I still get the error.
The error only happens with MSACCESS, not with MySQL or MSSQL server.
Thank you. |
function to create tables for Access and MySQL | Enrico,
Does your function support Memo fields ? How do you specify them ? thanks
Lucas,
I am using Enrico's code here and the Access tables are properly created with the autoinc counter |
function to create tables for Access and MySQL | Antonio,
[quote="Antonio Linares":2oz28g63]Enrico,
Does your function support Memo fields ? How do you specify them ?[/quote:2oz28g63]
Yes. Look at
[code=fw:2oz28g63]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">CASE</span> cType = <span style="color: #ff0000;">"M"</span></... |
function to create tables for Access and MySQL | Mr Enrico's function supports memo fields |
function to create tables for Access and MySQL | Antonio,
The problema is with DataRow class and Access and numeric fields with decimals, not with Mr. Enrico class.
Here is reported:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=26545">viewtopic.php?f=3&t=26545</a><!-- l -->
Mr. Nages is working on it. |
function to supress intermediate spaces | Dear friends,
Is there a function to remove the intermediate spaces from a string ?.
Very grateful;). |
function to supress intermediate spaces | Try STRTRAN(var," ","")
Good luck |
function to supress intermediate spaces | Thanks:
function QuitaEspacios( cCadena )
return strtran( cCadena, Space(1), Space(0) ) |
function to supress intermediate spaces | Also
CharRem( <cDelete>, <cString> ) --> cResult
Examples
CharRem( " ", "One Two Three" ) --> "OneTwoThree"
CharRem( "a", "Banana" ) --> "Bnn" |
function to supress intermediate spaces | Esta es una función que cambia espacios de mas de uno a uno.
lo uso mucho con instrucciones sql.
[code=fw:4e69c1be]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> TrimSpace<span style="color: #000000;">(</span> cString <span style="color: #000000;">... |
function to supress intermediate spaces | I vote for Jack's version:
STRTRAN(var," ","")
The simpler, the better. |
function to supress intermediate spaces | Me too! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
function to supress intermediate spaces | Carlos Vargas solution is better |
function to supress intermediate spaces | [quote="carlos vargas":3lra9ydz]Esta es una función que cambia espacios de mas de uno a uno.
lo uso mucho con instrucciones sql.
[code=fw:3lra9ydz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> TrimSpace<span style="color: #000000;">(</span> cString <... |
function to supress intermediate spaces | [quote="nageswaragunupudi":3gkm5yzv][quote="carlos vargas":3gkm5yzv]Esta es una función que cambia espacios de mas de uno a uno.
lo uso mucho con instrucciones sql.
[code=fw:3gkm5yzv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> TrimSpace<span style="col... |
function to supress intermediate spaces | [quote:2cow7id9]Elvira said:
Is there a function to remove the intermediate spaces from a string ?[/quote:2cow7id9]
[quote:2cow7id9]Nages said:
This is a highly optimized function specially meant for removing adjacent duplicate characters.[/quote:2cow7id9]
I took Elvira's statement to mean that he want to remove all sp... |
function to supress intermediate spaces | Mr James
Elvira's first posting was for removing all spaces.
StrTran( cString, ' '. '' ) is correct.
But CharRem() function specially made for such purposes and more efficient.
Mr Carlos Vargas' posting was to remove duplicate adjacent spaces. I suggested CharOne() for this instead of the code he was using.
These fu... |
function to supress intermediate spaces | [quote="nageswaragunupudi":2z2le2vy]But CharRem() function specially made for such purposes and more efficient.[/quote:2z2le2vy]
You're right! Look at this sample:
[code=fw:2z2le2vy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;... |
function to supress intermediate spaces | Wow! ++++1 |
function to supress intermediate spaces | EMG,
Your computer is fast--2.4 times faster than mine. I get:
3.31
0.03
Either way, charRem() is 100 times faster than strtran().
Thanks Nages.
This is only available with xHarbour though? |
function to supress intermediate spaces | [quote:38psvbez]This is only available with xHarbour though?[/quote:38psvbez]
Both Harbour and xHarbour.
We need to link \xharbour\lib\ct.lib for xHarbour and \harbour\lib\hbct.lib for Harbour.
If we are using fwh, it means we already have these libs included in our link scripts though we might not have noticed.
The... |
function to supress intermediate spaces | Hello,
is this a good and save way to remove CRLF form database-fields.
Thanks in advance
Otto
[code=fw:207g2d7s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">select</span> daten<br />aStruc := DBStruct<span style="color: #000000;">(</span><span style="color: #000000;... |
function to supress intermediate spaces | Mr Otto
You just need one line
[code=fw:2ea7svhh]<div class="fw" id="{CB}" style="font-family: monospace;"> aRec<span style="color: #000000;">[</span>I<span style="color: #000000;">]</span> := CharRem<span style="color: #000000;">(</span> CRLF, aRec<span style="color: #000000;">[</span>I<span s... |
functions in fwppc | there are many funcs in fwppc not run ?????cIni :=[b:2n10bt0q]GetWinDir()+"[/b:2n10bt0q]\PalmBeach.Ini" cTem :=[b:2n10bt0q]GetPvProfString[/b:2n10bt0q]("System","DirDat","",cIni) cDir :=IF(!Empty(cTem),[b:2n10bt0q]LFN2SFN[/b:2n10bt0q](cTem),cTem) [b:2n10bt0q] WritePProString[/b:2n10bt0q](c... |
functions in fwppc | Silvio,Windows Mobile does not provide all the functions that Windows for PC does. |
functions in fwppc | ok i understandI'd like know all function and comand it supportI have difficult to create a application and link it to main pc aplication |
functions in fwppc | Silvio,> I'd like know all function and comand it support Then you have to read all Microsoft docs for Windows Mobile and Windows PC <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
functions of the netbios | Hi!
I'm to work in Xbase++.
It would like to know if somebody knows to inform me which is the process to use the functions of the netbios in XBase++ (NbReset(), nbAddName(), etc).
The necessary library must be invoked well because it recognizes the functions. But it is not to connect, or either, for example, when makin... |
functions of the netbios | You may review FW++ source\winapi\netapi32.prg |
functions sin and cos | Hello,
I am trying to compile a my program that uses the trigonometric functions sin and cos, the problem is the linker says that both are already defined in FiveH32.lib...
I see the file selector.prg has an implementation of them <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" />... |
functions sin and cos | Can I see a sample of the problem?
EMG |
functions sin and cos | Antonino,
We are going to rename them as FWSIN and FWCOS
thanks for pointing it |
functions sin and cos | Enrico,
Functions Sin() and Cos() are already defined in Harbour hbct.lib |
functions sin and cos | [quote="Enrico Maria Giordano":pfqtnywz]Can I see a sample of the problem?
EMG[/quote:pfqtnywz]
I am using Visual studio 2017 with harbour:
[img:pfqtnywz]https://i.imgur.com/NZlTiKc.jpg[/img:pfqtnywz]
[quote="Antonio Linares":pfqtnywz]Antonino,
We are going to rename them as FWSIN and FWCOS
thanks ... |
functions sin and cos | Ok, good to know, thank you.
EMG |
functions sin and cos | How to get the same message from BCC?
EMG |
functions sin and cos | xHarbour's ct.lib or Harbour's hbct.lib provides all the functions provided earlier by CA-Tools library in the good old Clipper days.
These functions include Trigonometric functions:
ACOS(), ASIN(), ATAN(), ATN2(), COS(), COSH(), COT(), DTOR(), GETPREC(), SETPREC(), PI(), RTOD(), SIN(), SINH(), TAN(), TANH() |
funzione SEEK | Enrico,
hai un esempio di utilizzo di seek per adordd con SQL?
grazie? |
funzione SEEK | Ammesso e non concesso che ADORDD funzioni, non dovrebbe essere differente dalla normale SEEK.
EMG |
função DLL demora e sistema parece estar travado | Ola pessoal,
Eu chamo do meu sistema uma função de uma DLL de uma impressora fiscal, ex:
Bematech_FI_ArquivoMFD("", xIni, xFim, cTipo, "01", 2, cPublica, cPrivada, 1)
O problema é que esta função demora cerca de 5 minutos até terminar de ler os dados, e, o sistema parece estar travado .
Tentei colocar um TIMER par... |
função DLL demora e sistema parece estar travado | Ola amigo
Tudo joia
Seguinte, dependendo do período que vc informou, e a quantidade de movimentações que existam na ECF, pode levar até mais tempo que isso, já fiz um relatório aqui para SEFAZ do meu estado em uma ECF FISCNET da ELGIN que levou 7 dias, e foi de apenas 1 ano, mais o cliente vendia em media neste ECF ... |
fusionar tablas... | Hola a todos...
Tengo un problema... Vamos a ver, tengo que "unir" varias tablas en una sola. En FOX utiliza un select ...from.... que te permite guardar la seleccion en un cursor o tabla temporal. He buscado mucho por ahi y lo único que he encontrado que dicen que funciona es la instrucción join with... que se supone... |
fw + mysql + ado | Hola,
Estoy haciendo un sistemita basico con FW y MYSQL. Ya tengo la conexion con ODBC y puedo conectarme y leer datos. lo que no puedo hacer es actualizar datos...
alguien tiene algun ejemplo basico de como actualizar datos utilizando variables del programa en FW y pasandolas a algo como esto ?
csql:="UPDATE p... |
fw + mysql + ado | RMC
Ejemplo: Completo
*-
*- Programa : CAT_USU.PRG
*- Sistema : Nombre del Sistema
*- Ambiente : Clipper 5.X, FiveWin 1.95, Blinker 3.2
*- Autor : Sistemas 2002
*- Fecha : 08/11/04
*- Versión : Versión Genera 1.0, <!-- e --><a href="mailto:nazariosn@yahool.com.mx">nazariosn@yahool.com.mx</a><!-- e -->
*-
#INCLUDE '... |
fw..bitmaps | I saw there is the possibility to save bitmaps on a function as FW_BmpPlus()
But How I must make if I wish make the same for my bitmaps ? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.