RE: MI-L Drop and replace all columns?

2005-06-21 Thread Terry McDonnell
Ross, I've not done this programmatically before but, if I did, below is how I'd do it. Not sure whether the Obj column is protected in a "drop" so I've put the test in for it. Of coursre, you'd well back up your table before trying it! HTH Terry ___ Dim

RE: MI-L Drop and replace all columns?

2005-06-21 Thread Jacques Paris
al Message- From: Terry McDonnell [mailto:[EMAIL PROTECTED] Sent: June 21, 2005 04:45 To: mapinfo-l@lists.directionsmag.com Subject: RE: MI-L Drop and replace all columns? Ross, I've not done this programmatically before but, if I did, below is how I'd do it. Not sure whether the Obj co

RE: MI-L Drop and replace all columns?

2005-06-21 Thread Terry McDonnell
Ross Sorry, I mixed up the code somehow in the 1st draft. Please check amendments below: Terry -- Dim lnNumCols, lnColNum As SmallInt lcColName, lcCol as String Open Table "YourTable" lnNumCols = TableInfo( "YourTable", TAB_INFO_NCOLS) For lnC

Re: MI-L Drop and replace all columns? - then Rename Table

2005-06-21 Thread Ross Nixon
RE: MI-L Drop and replace all columns?Ross, Alternatively, you could do it this way: create a new table with the new columns make it mappable so it can hold geographic objects Insert objects from old_tablename into new_table delete the old_tablename Create Table "new_table" (ID Inte