Comments on topic "How to SCAN substrings in a dbf - Summer"

Aqui é o lugar para bater papo e trocar idéias sobre os mais variados assuntos

Moderador: Moderadores

alxsts
Colaborador
Colaborador
Mensagens: 3092
Registrado em: 12 Ago 2008 15:50
Localização: São Paulo-SP-Brasil

Comments on topic "How to SCAN substrings in a dbf - Summer"

Mensagem por alxsts »

This topic comes to explain code details on topic How to SCAN substrings in a dbf - Summer 87
marge0512 escreveu: APPEND Blank
REPLACE Field_Name with "COMPNY_NAM"
REPLACE Field_Type with "C" <------------Why value "C"? What does that mean.
REPLACE Field_Len with 25
REPLACE Field_Dec with 0 <------------Also, the same for this value.
In xBase tables, data is stored in the form of rows. These rows are made up of columns. Each column has a particular set of characteristics, as you can see in the above code:
- Field name, up to ten chars is the name of the field
- Field type: "C"haracter, "N"umeric, "D"ate, "L"ogical and "M"emo is the data type
- Field Length: numeric value indicating field length in bytes (10 when Field type is Memo) is the field length
- Field Decimal is the decimal places quantity when Field type is Numeric
marge0512 escreveu:Also, with *Close struct table
*--------------------
USE <-----------Do I need to be concerned with EXCLUSIVE or SHARED?
When you emit a USE command without any argument Clipper closes the table open in the currently selected work area. Since it's closing, no worries about shared or exclusive...
marge0512 escreveu: DBEDIT(6, 19, 19, 60, {"tmpTable->CASE_LNAME"},"_REC_FND_", NIL, {"Select a name "}) <---------Why does DBEDIT use
{"tmpTable->CASE_LNAME"} and not
{"tmpTable->COMPNY_NAM"} at all?
Sorry, this confusion in your mind is my fault. Actually, the contents of that field is the search result we found using the dollar operator either in CASE_LNAME or COMPNY_NAM fields. I kept the same column name but I could give it another name (e.g. SrchResult) to keep things clear

You'll find further details seeing specific commands or functions in the manual.

Any other doubt? Post again.
[]´s
Alexandre Santos (AlxSts)
marge0512
Usuário Nível 3
Usuário Nível 3
Mensagens: 121
Registrado em: 20 Mai 2011 12:42
Localização: United States

Comments on topic "How to SCAN substrings in a dbf - Summer"

Mensagem por marge0512 »

Thanks! That clears everything up. Would you still need REPLACE Field_Dec with 0 since the field type is a character? Just curious.

Thanks again!!
Avatar do usuário
Pablo César
Usuário Nível 7
Usuário Nível 7
Mensagens: 5312
Registrado em: 31 Mai 2006 10:22
Localização: Curitiba - Paraná

Comments on topic "How to SCAN substrings in a dbf - Summer"

Mensagem por Pablo César »

Hi Marge !

There is not decimals replacing when field is character type. For declaration/creates dbf this is ignored.
Um clip-abraço !

Pablo César Arrascaeta
Compartilhe suas dúvidas e soluções com todos os colegas aqui do fórum.
Evite enviar as dúvidas técnicas por MPs ou eMails, assim todos iremos beneficiar-nos.
marge0512
Usuário Nível 3
Usuário Nível 3
Mensagens: 121
Registrado em: 20 Mai 2011 12:42
Localização: United States

Comments on topic "How to SCAN substrings in a dbf - Summer"

Mensagem por marge0512 »

Ok, thank you!
Responder