Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

Support Forum



Change Data Type
rlocke asked:
No direct way easily to change the data type of an existing field; but both of these are pretty easy.

One exception is change the text length on a text field: Go into the table (“table”.data file), hit the “Design” tab, and then click a text field; There should be a “Maximum Text Length” property in the “properties” tab off to the right. (accepts any number between 1 and 255 characters)


To change a few data types at the same time (and keep your data) by creating a new table and transferring the data. This is actually pretty easy. 
• I would first back up the application (file-> export – >Application to zip archive) just in case
• Open up your existing table in Design view in one browser window (so you can see the field details of your existing table)
• Create a new table (File – >New DataTable)
• Add all the fields from your original table (keep the EXACT same names).  Change the types as desired
• Save the table as something like TableName_New
• Go back to the original table design view, and click the “Data Transfer” button
• Locate your new table
• Same named fields should line up automatically; System Fields: Keep values from source records; Copy which source table records?:All records
• Click “transfer”
• Check the new table data
• Rename the original table FOLDER to something like “TableName_Old” (this renames the table)
• Rename the “new” table with a copy of the data to EXACTLY the “TableName”
• Delete (when you are sure) the “TableName_Old” table

If your table has a ton of fields (and it’s a pain to re create the table from scratch), COPY the original table structure only, and make adjustments to the table, THEN copy the data into the new table; To copy the original table structure:
• Find the FOLDER containing your table
• Hit the “contents” tab in the designer
• Select the check box next to the original table’s FOLDER
• Click the “copy” button
• Select a location for the new table (should be in the same parent folder as the current table)
• Call it something like “TableName_New”
• Copy only “Structure Only”
• Get into the new table and delete the old fields of the wrong type
• Add the new fields with EXACTLY THE SAME NAME with the correct new type
• Follow the instructions above (from “Go back to the original table” on)
 
  rlocke (DataWeb) responded:
  Dataweb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
Dataweb Support
 
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us