adox asp ms access delete a column from a table

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default adox asp ms access delete a column from a table

    Hi folx -

    Here is the code I'm trying (but it errors out with "Item cannot be found in
    the collection corresponding to the requested name or ordinal."):

    objTable.columns(s_name_field_to_delete).delete
    AND SAME ERROR WITH:
    objTable.columns.delete s_name_field_to_delete

    What am I doing wrong?

    Thanks!

    --
    Scotter


    Scotter Guest

  2. Similar Questions and Discussions

    1. querying field / column names in Access table
      I got great info on my last post, so let's try this one and see if my luck is still good: I have an Access table with about 30+ columns / fields...
    2. ASP/Access 2002: how do I get column names from table (in order) using OLE DB?
      When I use ADOX to get columns(fields) of a table, they are *auto-sorted alphabetically by name*. I need to get the list of field names as they...
    3. ADOX - how do I select a table by name in order to read which fields it has?
      Hi - I'm finding tons of examples out there on how to create a table or enumerate thru tables and same with fields but what if I just want to...
    4. How to get the lenght of an Access database using ADOX
      I want to administer a remote Access database using ASP. I use the ADOX setup. I am able to list the tables, the fields in each table, the field...
    5. using Access queries using ADOX
      Hello, I have the following code in an asp 3.0 page: Dim dbConn As adodb.Connection Dim cat As ADOX.Catalog Dim view As ADOX.view Set dbConn...
  3. #2

    Default Re: adox asp ms access delete a column from a table

    Show more code than that. Or make sure you variable has the value you think
    it does. And also instead of ADOX, you could just use the existing ADO
    connection and execute:

    oADO.Execute "alter table TableName drop [" & s_name_field_to_delete & "]"

    Ray at home

    "Scotter" <spam@spam.com> wrote in message
    news:7a7Hc.2169$857.1509@fe2.texas.rr.com...
    > Hi folx -
    >
    > Here is the code I'm trying (but it errors out with "Item cannot be found
    in
    > the collection corresponding to the requested name or ordinal."):
    >
    > objTable.columns(s_name_field_to_delete).delete
    > AND SAME ERROR WITH:
    > objTable.columns.delete s_name_field_to_delete
    >
    > What am I doing wrong?
    >
    > Thanks!
    >
    > --
    > Scotter
    >
    >

    Ray at Guest

  4. #3

    Default RE: adox asp ms access delete a column from a table

    Hio Scotter,

    Please refer to Bob's reply in microsoft.public.inetserver.asp.general

    Thanks,

    Luke

    [MSFT] Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139