| |

VerySource

 Forgot password?
 Register
Search
View: 1878|Reply: 5

Problem with pictures displayed in common fields

[Copy link]

1

Threads

19

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-10-15 10:30:01
| Show all posts |Read mode
There is a student table, which has the field "photo", add a photo with the following statement
APPEND GENERAL photo FROM a.jpg

The issue is:
    When displayed in the form, only the file name a.jpg is displayed, why not display the picture? How can I display the picture?
    Thanks a lot! !
Reply

Use magic Report

0

Threads

28

Posts

25.00

Credits

Newbie

Rank: 1

Credits
25.00

 China

Post time: 2020-10-15 11:30:01
| Show all posts
APPEND GENERAL photo FROM a.jpg----
What database syntax?
Reply

Use magic Report

0

Threads

32

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-10-15 12:45:01
| Show all posts
Change to BMP picture
Reply

Use magic Report

1

Threads

19

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

 Author| Post time: 2020-10-15 15:30:01
| Show all posts
Remember to create a reg file to solve this problem. The content of the reg file is as follows:

[HKEY_CLASSES_ROOT\.bmp]
@="Paint.Picture"

[HKEY_CLASSES_ROOT\.jpeg]
@="Paint.Picture"

[HKEY_CLASSES_ROOT\.gif]
@="Paint.Picture"

[HKEY_CLASSES_ROOT\.jpg]
@="Paint.Picture"


But I created this file, and the registration still can’t be opened. I don’t know who has a better way
Reply

Use magic Report

0

Threads

18

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-10-15 15:45:01
| Show all posts
Normally, DblClick should be able to open.

I remember that the developers of Ken and SQL told me that general pictures, etc., should be saved in files as much as possible.
Only one path needs to be saved in the database, so there may be little or no support for common fields in the future.
Therefore, I do not recommend the above method.

If your pictures are not very big, they should be saved in the following types Memo (Binaray)
Use FileToStr to get a string, and then directly insert it into the type. You can use the field
The content is assigned to the PictureVal property of Image.
Reply

Use magic Report

1

Threads

19

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 Unknown

 Author| Post time: 2020-10-15 16:00:01
| Show all posts
It has been successfully resolved, thank you all
I used the memo field, implemented by the strtofie functions of FILETOSTR
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list