Results 1 to 4 of 4

Thread: ALTER TABLE statement

  1. #1

    Thread Starter
    Hyperactive Member brenaaro's Avatar
    Join Date
    Sep 2001
    Location
    Montreal, Canada
    Posts
    391

    ALTER TABLE statement

    Hi,

    I have a database with a table (Sent) which contains a field (among others) called sntSubject. It is a text field of length 50.

    I am trying to use an ALTER TABLE statement to set the length to 255 through VB referencing MS DAO3.6.

    I create a database object, and use the DB.Execute method but I always get a Syntax error in my ALTER TABLE statements. Here is what I have tried:

    ALTER TABLE Sent MODIFY sntSubject TEXT(255);

    or

    ALTER TABLE Sent MODIFY sntSubject CHAR(255);

    but no luck. What would I need to do to make this work?

    Thanks
    And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.

  2. #2
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    try
    ALTER TABLE Sent ALTER COLUMN sntSubject Text(255)
    VB 6.0, Access, Sql server, Asp

  3. #3

    Thread Starter
    Hyperactive Member brenaaro's Avatar
    Join Date
    Sep 2001
    Location
    Montreal, Canada
    Posts
    391
    Beautiful! Thanks mate.
    And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.

  4. #4
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    I'm getting a syntax error in this alter statement but I don't know what it is...

    VB Code:
    1. ALTER TABLE tblratesfromfeecard ALTER COLUMN [Capital Receipts Rate] text(255)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width