Results 1 to 4 of 4

Thread: ADOX used to change a Column's Property? (Resolved)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Resolved ADOX used to change a Column's Property? (Resolved)

    Originally I just wanted to add more space to a comment field on an Access 97 using code

    Why? I am helping a guy who doesn't have VB installed in his computer and he is working on a DataBase with the help of a DB manager I programmed for him.

    But recently he found out one of the fields (Comment) was too short for him... So I tried using another VB project I developed. This little thing executes SQL statements in Access 97 databases.

    The problem is that in Access 97 databases the statement "ALTER TABLE tablename ALTER COLUMN columnname" doesn't work.

    So I searched the net for a way to get this done and I found out this one: Link

    The problem is that I cannot set the attributes. My little project runs well but whenever I try to set the attributes of the Columns it will crash with this message:


    Run-Time Error '3265'

    Item cannot be found in the collection corresponding to the requested name or ordinal.

    It will highlight "cat.Tables.Append tbl" but when I comment the line ".Columns(Column.Name).Attributes = Column.Attributes" it will throw an error...

    The error tells me the following:


    Run-time error '-2147467259(80004005)':

    The field 'MyTable.Comments' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field.

    Obviously, some Comments are in blank since you can simply save the data without a comment. I am going crazy here!!

    Please help me... I attach the project I am working on.

    P.S. Thanks to Manavo for the CCommonDialogs and FolderCallBack
    Attached Files Attached Files
    Last edited by Tec-Nico; Oct 3rd, 2004 at 01:57 PM.
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

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