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

Columns being dropped

Status
Not open for further replies.

IGottaKnow

Programmer
May 23, 2000
2
GB
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?
 
What does your code look like? <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253
 
SELECT clistates<br>scan<br>if trans_type = 'OB' and amount &gt; -10 and amount &lt; 10<br> theclicode = cli_code<br> thecurrcode = curr_code<br> select cli_code from clistates; <br> where;<br> cli_code = theclicode and curr_code = thecurrcode ;<br> INTO table c:\statetemp<br> IF reccount() = 1 <br> select clistates<br> delete<br> ENDIF <br>endif<br>endscan<br>SELECT clistates<br><br> <br>REPLACE ALL last_stmt WITH ldtodaysDate-45 FOR ISNULL(last_stmt)<br>GO TOP<br><br>ALTER TABLE clistates ADD COLUMN bbfwd n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN finpl n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN sptpl n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN payrecd n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN paysent n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN payencl n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN stmt_no I NULL<br>ALTER TABLE clistates ADD COLUMN stmtbal n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN smryText c(60) NULL<br> <br>ALTER TABLE clistates ADD COLUMN ClientName c(30) NULL<br>SELECT clistates<br>SCAN<br> REPLACE ClientName WITH &quot; &quot; <br>ENDSCAN<br><br>This is the main snippet - I have just found that occasionally it crashes at [REPLACE Clientname WITH &quot; &quot;]<br>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:<br>SPTPL<br>STMT_NO<br>PAYSENT <br>Could it have something to do with deleting some rows from the clistates table before I add the new columns?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top