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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need too exort memo field in Paradox 9

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
Paradox 9.
when I export a particular table the comments do not come along. Comments are a memo field. I know they are stored in a .MB file with the same name. I can view them in notepad sort of.
Is there a way to export the comments?
Can I write a script or something in Paradox? I don't know Paradox though.

DougP, MCP, A+
 
I got this code from another site.
I created a button with and Action (I don't know if this is correct)
Code:
method run(var eventInfo Event)
var
tab1,tab2 tcursor
com Array[2] Anytype
endvar

tab1.open("projects.db")
tab2.open("projectscomments.db")
tab2.edit()

scan tab1:
com[1]=tab1."project number" ; change to suit your field names
com[2]=tab1.comments ; " "

tab2.insertrecord()
tab2.copyfromarray(com)
endscan
tab2.endedit()
msginfo("Status","Done")
endMethod
[code]
but it stops on the word "RUN" and highlights it gray
can someone help me with this?

DougP, MCP, A+
 
You're very close.

What your code is doing is copying the two fields "project number" and "comments" from projects to project comments.

Remove all the stuff about tab2 and replace it with a simple file open, write directly from the fields without placing the values in the "com" array, and close the file.

In terms of your immediate problem, copy your code that is "inside" the method/endMethod block, delete the button, and create a new button. The first time you modify the script for that button, you should get a script with just the framework for the method. Paste your code inside it, and it should work.
 
I know nothing about Paradox
when I create a new button a wizard pos up. what do I select from "Category" then "Action"?

DougP, MCP, A+
 
Let me get back to you... Paradox is installed on the other puter! I'll do this and take notes -- I usually zoom through it without thinking.
 
After the copy, you should tab2.UNLOCKRECORD() and *test for unlock success or failure*.

Where is this 'run'? I thought you have this in a pushbutton...??? There shouldn't be a 'run' statement in a pushbutton.

Also, you shouldn't need the array. Extra steps that cost time and extra programming to figure out later if you need to make changes.

Code:
scan tab1 :
tab2.insertafterrecord()
tab2."fieldname"=tab1."fieldname"
tab2."fieldname2"=tab1."fieldname2"
if not tab2.unlockrecord() then
; error checking
endif
endscan

Tony McGuire
"It's not about having enough time; we have the rest of our lives. It's about priorities.
 
back on this again
here is my code now
Code:
method action(var eventInfo ActionEvent)
var
tab1,tab2 tcursor
com Array[2] Anytype
endvar

tab1.open("projects.db")
tab2.open("projectscomments.db")
tab2.edit()

scan tab1:
com[1]=tab1."project number" ; change to suit your field names
com[2]=tab1.comments ; " "

tab2.insertrecord()
tab2.copyfromarray(com)
endscan
tab2.endedit()
msginfo("Status","Done")
endMethod

getting this error
An error was triggerd in the 'edit' method on an object of TCursor type.
if I click the >> button I also have this
TCursor not opened.

Can someone help me with this?

DougP, MCP, A+
 
OK forget this method
I exported to the Pradox tables to DBase III instead of ASCII. This creates two tables a .db and a .DBT the DBT is the where the comments are.
Then imported the DBase III file into Access which brings over the comments too in the correct column.

Thank you all

DougP, MCP, A+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top