asp線上實現修改access資料庫的欄位類型

來源:互聯網
上載者:User
資料|資料庫|線上|access|欄位類型

阿里西西(alixixi.com)在做一個客戶項目的時候,程式已經交付並上傳到客戶的網通空間,但我們的Team Dev使用的是電信線路,進行幾十M大小的資料轉送是非常的慢。

在一個調整中,因為欄位設計得太短,需要修改資料庫的欄位類型,但資料庫非常大,如果下載的話,估計半天才能下載完,修改完成還在再上傳。。。

於是,決定通過線上修改AC庫的欄位,查了些資料,寫出了以下代碼,輕鬆實現了把原來文本類型的欄位改成了備忘型,一切問題解決!

以下代碼可以提供給大家參考,把表名為vote裡的eselect1~8幾個欄位全部變為備忘長文本檔欄位,MSSQL庫可自行參考來修改。

以下是引用片段:
<!--#include file="conn.asp"-->
<%
conn.execute("alter table vote alter column eselect1 longtext")
conn.execute("alter table vote alter column eselect2 longtext")
conn.execute("alter table vote alter column eselect3 longtext")
conn.execute("alter table vote alter column eselect4 longtext")
conn.execute("alter table vote alter column eselect5 longtext")
conn.execute("alter table vote alter column eselect6 longtext")
conn.execute("alter table vote alter column eselect7 longtext")
conn.execute("alter table vote alter column eselect8 longtext")
%>



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.