Editing table definitons

Last post 07-06-2012 8:16 AM by Jay.Clark. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-03-2012 8:28 PM

    Editing table definitons

    Can some one please guide how to edit the definition of the existing table in Pervasive SQL 11 I tried editing it in PCC. But later when I see click on Edit table definition in DDF builder on the same table. I do see many unnamed fields coming over in the middle of existing fields. I do see the indexes are moving over and the unnamed columns overlapping the exisiting keys. Could some one guide a better way to edit table definition.
  • 07-05-2012 8:07 AM In reply to

    Re: Editing table definitons

     Does this table already have a SQL definition?  Would using Alter Table help (http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=sqlref/syntaxref.03.07.html)?  Can you provide an example of what you are doing, and the output you get?

  • 07-06-2012 1:41 AM In reply to

    Re: Editing table definitons

    There is a table which has SQL definition and all the indexes and fields are declared long time back. Now I would like to increase the field lengths. For doing this I have opened the table in Edit mode in PCC then increased the Internal(buffer) variables at the end. Then increased the lengths of the required fields. Ex : Initially Name length was 20 bytes. Now I increased it to 40. There is no problem when I see it in PCC but when I see the same table in Edit mode in DDF Builder I do see some unnamed and unknown fields got generated automatically beside to NAME field. And I could not able to edit the SQL definition in DDF builder. It is just READ only. Can some one guide some method so that I can increase the field lengths. Also how to transfer the existing data to new table with new definitons.
  • 07-06-2012 8:16 AM In reply to

    Re: Editing table definitons

     I think I'm missing some pieces to the puzzle here.  Can you post a butil -stat of the file you are working on?  Open a command prompt and enter butil -stat <filename> where <filename> is the directory and file name you are editing (Ex: butil -stat c:\Directory\Filename.mkd).

     What is the data type of the field you are trying to extend?  Following your steps I created a table with an Identity field (ID) and three string fields (Name (20), Address (50), Phone (10)). I added data to the table then edited the Name field in the PCC increasing it to 40.  Looking at the table in DDF Builder I see it's been edited appropriately.

     Also, if there is a Btrieve application that accesses the file, remember the application will have to be updated to accept the new field length.  

Page 1 of 1 (4 items)