Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing pictures to Paradox 1

Status
Not open for further replies.

safirlaila

Programmer
Feb 5, 2004
19
NO
Hi,

is there any way to import picures from jpg-files and into a Paradox table?

With Regards
Laila
 
What version of Paradox are you using?

Many .jpg files can be used by Paradox, but not all.

I believe support stops at 24 bit, but it may be overall resolution.

Are you looking for manual import, or programmatic?

Tony McGuire
Stop Rob Bennett - "It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Tony, thank you for responding.

I use Paradox 9.0 and want to do it programmatic. If its impossible programmatic I can do it manually as well.

With Regards
Laila
 
You can fancy it up with filebrowser, or place within a scan for multiple images, but the below is the bottom basics.

Code:
var
  tc    tcursor
  gr    graphic
endvar

if not tc.open(":alias:tablename.db") then
  errorshow()
  return
endif
tc.edit()
if gr.readfromfile("drive:\\fullpath\\image.jpg") then
  tc.insertrecord()
  tc."graphic_fieldname"=gr
  try
    tc.unlockrecord()
  onfail
    errorshow()
    tc.canceledit()
  endtry
endif
tc.endedit()
tc.close()

Tony McGuire
Stop Rob Bennett - "It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top