Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This is easily the most helpful website I've ever used, and this is the best forum with the quickest response time bar none...."

Geography

Where in the world do Tek-Tips members come from?

Extract pictures from Paradox to file

LidiaB (IS/IT--Management)
7 Dec 10 18:35
Hi,

I have Paradox 11 installed, and I'm trying to extract some pictures from a table. The pictures are graphic type. I'm very new at ObjectPAL so from the research that I made so far I came up with this code:


method run ( var eventInfo Event )
var
tc  tcursor
img graphic
cnt  number
endvar          

cnt = 0
if tc.open("C:\\pathtoDB\\Images.db") then   
    scan tc :
        cnt = cnt + 1  
        tc.fieldValue("ImageField",img)
        img.writeToFile("C:\\pathtoimages\\IMAGE_" + String(cnt) + ".jpg")   
    endscan
    tc.close()
endif
endmethod

But I get this error:
"You have tried to use an unassigned variable. A variable must be assigned a value before you can use it."

Any ideas of what could be wrong?
Any help is greatly appreciated.

Thanks,
Lidia
jlockley (TechnicalUser)
3 Jun 11 16:41
I've been working with an unassigned variable issue for something else and noticed a few posts by Bertil either on his site (I assume he's a guy) or the db community. Run a search for paradox unassigned variable to find them.


 
Bystander (TechnicalUser)
30 Jun 11 8:41
Hi Lidia,

I think I can see what might be causing the error but for me to test it out it please could you share the structure of the images.db table.

Once I know what the field names are in the table I should be able to come back to you within a day or so.

Regards

Bystander
jlockley (TechnicalUser)
30 Jun 11 20:40
I have a question: These pictures are in a table and you want to import them into Paradox? In that case, why not export them to paradox or access then query them into the new file? Or import them directly into a PDx file?
 

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close