×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!
  • Students Click Here

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

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Columns being dropped

Columns being dropped

Columns being dropped

(OP)
I use a stored procedure to return a table to FoxPro which I then copy to a FoxPro table. The problem I have (only sometimes) is that when I try to add columns to the table and insert data into them I get the error "Variable not found". When I then browse the table, one of the columns which should be there, isn't. Any ideas?

RE: Columns being dropped

What does your code look like?

John Durbin


ICQ VFP ActiveList #73897253

RE: Columns being dropped

(OP)
SELECT clistates
scan
if trans_type = 'OB' and amount > -10 and amount < 10
theclicode = cli_code
thecurrcode = curr_code
select cli_code from clistates;
where;
cli_code = theclicode and curr_code = thecurrcode ;
INTO table c:\statetemp
IF reccount() = 1
select clistates
delete
ENDIF
endif
endscan
SELECT clistates


REPLACE ALL last_stmt WITH ldtodaysDate-45 FOR ISNULL(last_stmt)
GO TOP

ALTER TABLE clistates ADD COLUMN bbfwd n(16,2) NULL
ALTER TABLE clistates ADD COLUMN finpl n(16,2) NULL
ALTER TABLE clistates ADD COLUMN sptpl n(16,2) NULL
ALTER TABLE clistates ADD COLUMN payrecd n(16,2) NULL
ALTER TABLE clistates ADD COLUMN paysent n(16,2) NULL
ALTER TABLE clistates ADD COLUMN payencl n(16,2) NULL
ALTER TABLE clistates ADD COLUMN stmt_no I NULL
ALTER TABLE clistates ADD COLUMN stmtbal n(16,2) NULL
ALTER TABLE clistates ADD COLUMN smryText c(60) NULL

ALTER TABLE clistates ADD COLUMN ClientName c(30) NULL
SELECT clistates
SCAN
REPLACE ClientName WITH " "
ENDSCAN

This is the main snippet - I have just found that occasionally it crashes at [REPLACE Clientname WITH " "]
Previous it was crashing a few lines on down from the snippet I have included when I tried to add data to the following columns:
SPTPL
STMT_NO
PAYSENT
Could it have something to do with deleting some rows from the clistates table before I add the new columns?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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! Already a Member? Login

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