locked
How can I make a schema change using oledb on an Access db? RRS feed

  • Question

  • Hi,

    running the following cmd in an ExecuteNonQuery stmt gives a syntax error i think because the column name is a keyword password.

    ALTER TABLE UserIDs ALTER COLUMN Password text(64);

    That stmt works in dao and in Access directly, just not in oledb.  I tried adding quotes around password, but then it said column not found.

    So now I am trying to use a datatable and changing the maxlength property, but i don't see how to save the schema change.

    Any ideas on how I can change the length of this existing field? (unfortunately i cannot change the database directly)

    Thanks.

    Wednesday, April 15, 2009 1:11 AM

Answers

  • Enclose it in square brackets.  You cannot change the schema on the fly I believe.
    AlexB
    Wednesday, April 15, 2009 2:53 AM

All replies

  • Enclose it in square brackets.  You cannot change the schema on the fly I believe.
    AlexB
    Wednesday, April 15, 2009 2:53 AM
  • That was it, thanks!
    Wednesday, April 15, 2009 4:03 AM