![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all,
It's me again. Here is another problem I have. I have a "Person" table with a blob field for the picture of the person. I created a form to enter the name of the person, and there is an Image field. I added a contextual menu on this image to allow the user to load the image from a file. So, in the code, I use a OpenDialog window (so that the user can select a picture file) Here is the code : Code:
If ODPImage.Show <> cCancel Then Fichier = ODPImage.File ImgPBlob.Image = ODPImage.File FileClose (Fichier) strSQL = "Update personnes set P_Image = " & cmd.FileToBLOB(Fichier) & " Where P_ID = " & TBPID.Text cmd.CommandText = strSQL cmd.ExecuteNonQuery End If "The process cannot access the file '<__name_of_file_here__>' because it is being used by another process" I tried to close the file (as you can see with the command FileClose), but it does not work. And another extra question : How do I remove a picture in the table ? Is it : Code:
Update personnes set P_Image = NULL where . . . Code:
Update personnes set P_Image = '' where . . . Code:
Update personnes set P_Image = "" where . . . Code:
something else ?? |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "Error saving file" | N1c0_ds | Bug Reports | 0 | 09-14-2008 01:25 AM |
| Picture while loading | derez | Questions & Help Needed | 2 | 01-01-2008 09:27 AM |
| Saving an image to a file | Erel | Additional Libraries | 8 | 09-04-2007 08:14 PM |
| How to convert an Access database to a sqlite database | Peter | Code Samples & Tips | 5 | 07-24-2007 04:20 PM |
| Saving the screen to a file | derez | Questions & Help Needed | 3 | 07-04-2007 12:08 PM |