Jump to content

PHC - Inserir/Criar novas referencias a partir de um ficheiro .dbf

Recommended Posts


Boa Noite

Tenho uma tecla do utilizador que actualiza o epv1 e epv2 a partir do ficheiro real.dbf:

if file('c:\real.dbf') then
use c:\real.dbf
select real

cod='"Update st set epv1='+alltrim(str(real.epv1))+'.'+substr(alltrim(str(real.epv1-int(real.epv1),8,2)),3,2)+' where ref='+"'"+rtrim(real.ref)+"'"+'"'
cod1='"Update st set epv2='+alltrim(str(real.epv2))+'.'+substr(alltrim(str(real.epv2-int(real.epv2),8,2)),3,2)+' where ref='+"'"+rtrim(real.ref)+"'"+'"'


messagebox('Ficheiro C:\REAL.DBF não foi encontrado!',16,'Obrigado')
select st

Preciso de saber que linhas tenho que alterar e se é possível inserir novas referencias com os campos ( ref, design, epv1, epv2 e familia ) a partir do ficheiro.

Caso a referencia já exista o "programa passa a frente"?

Cumprimentos, Rui

Edited by apocsantos

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.