problem adding records ? 
Author Message
 problem adding records ?

Hi,

i've have a strange problem. When i add one record to a file all goes well,
when i try to add another record in the same session the application comes
with an error 47 : File (...) could not be opened. Error : invalid record
declaration(47) ...
I have to close the application. When i restart it i can add one more record
before it comes with the same error.

The update code is writen by me and is shown here :

IF CLIP(testfoto) = ''
  MESSAGE('Type filename or select from directory!!')
  CYCLE
else
   LOC:FileResult = xExtractFile(testfoto)
   loc:extention = xExtractExt(testfoto)
   message(LOC:FileResult)
   if loc:renamefile = '' then
        Access:fotofiles.Insert()
        LOC:FileDest = clip(copyfotopad) & clip(LOC:FileResult)
        message(LOC:FileDest)
        copy(testfoto,LOC:FileDest)
        FOT:foto = LOC:FileDest
        FOT:naam = clip(LOC:FileResult)
        Access:fotofiles.Update()
   else
        Access:fotofiles.Insert()
        LOC:FileDest = clip(copyfotopad) & clip(loc:renamefile) & '.' &
loc:extention
        copy(testfoto,LOC:FileDest)
        FOT:foto = LOC:FileDest
        FOT:naam = clip(loc:renamefile)
        Access:fotofiles.Update()
   end
END

This code is being executed when i close the window.

What am i doing wrong ???

Thanks in advance.
Erwin



Fri, 21 Jan 2005 23:25:45 GMT  
 problem adding records ?
I have had this before.
Check if any relationships to and from the file are sound.
Cheers


Quote:
> Hi,

> i've have a strange problem. When i add one record to a file all goes
well,
> when i try to add another record in the same session the application comes
> with an error 47 : File (...) could not be opened. Error : invalid record
> declaration(47) ...
> I have to close the application. When i restart it i can add one more
record
> before it comes with the same error.

> The update code is writen by me and is shown here :

> IF CLIP(testfoto) = ''
>   MESSAGE('Type filename or select from directory!!')
>   CYCLE
> else
>    LOC:FileResult = xExtractFile(testfoto)
>    loc:extention = xExtractExt(testfoto)
>    message(LOC:FileResult)
>    if loc:renamefile = '' then
>         Access:fotofiles.Insert()
>         LOC:FileDest = clip(copyfotopad) & clip(LOC:FileResult)
>         message(LOC:FileDest)
>         copy(testfoto,LOC:FileDest)
>         FOT:foto = LOC:FileDest
>         FOT:naam = clip(LOC:FileResult)
>         Access:fotofiles.Update()
>    else
>         Access:fotofiles.Insert()
>         LOC:FileDest = clip(copyfotopad) & clip(loc:renamefile) & '.' &
> loc:extention
>         copy(testfoto,LOC:FileDest)
>         FOT:foto = LOC:FileDest
>         FOT:naam = clip(loc:renamefile)
>         Access:fotofiles.Update()
>    end
> END

> This code is being executed when i close the window.

> What am i doing wrong ???

> Thanks in advance.
> Erwin



Fri, 21 Jan 2005 23:27:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problems adding records to RB database

2. Problem adding records with autoinc numbers without a window

3. Records Disappeared/Added to the prior Record No

4. Prime record fields on insert - Before adding auto incremented record

5. Add Child Record Within New Parent Record form.

6. Adding child records for a newly inserted parent record (CW2003)

7. CW2002.01 Record Add Problem.

8. Adding Records from Toolbar - a problem in C5E

9. Add record problem (ABC)

10. Problem with adding an auto-incremented record

11. Records with a record # of zero problem

12. An array of records within an array of records (Still a problem)

 

 
Powered by phpBB® Forum Software