程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> 其他數據庫知識 >> 更多數據庫知識 >> 創建動態MSSQL數據庫表

創建動態MSSQL數據庫表

編輯:更多數據庫知識

以下是引用片段:
復制代碼 代碼如下:
  ImportsSystem.Data
  ImportsSystem.Data.SqlClient
  PublicClassForm1
  InheritsSystem.Windows.Forms.Form
  PrivateConnectionStringAsString="DataSource=.;InitialCatalog=;UserId=sa;Password=;"
  PrivatereaderAsSqlDataReader=Nothing
  PrivateconnAsSqlConnection=Nothing
  PrivatecmdAsSqlCommand=Nothing
  PrivateAlterTableBtnAsSystem.Windows.Forms.Button
  PrivatesqlAsString=Nothing
  PrivateCreateOthersBtnAsSystem.Windows.Forms.Button
  #Region"Windows窗體設計器生成的代碼"
  '窗體重寫處置以清理組件列表。
  ProtectedOverloadsOverridesSubDispose(ByValdisposingAsBoolean)
  IfdisposingThen
  IfNot(componentsIsNothing)Then
  components.Dispose()
  EndIf
  EndIf
  MyBase.Dispose(disposing)
  EndSub
  PublicSubNew()
  MyBase.New()
  InitializeComponent()
  EndSub
  PrivatecomponentsAsSystem.ComponentModel.IContainer
  FriendWithEventsDataGrid1AsSystem.Windows.Forms.DataGrid
  FriendWithEventsCreateDBBtnAsSystem.Windows.Forms.Button
  FriendWithEventsCreateTableBtnAsSystem.Windows.Forms.Button
  FriendWithEventsCreateSPBtnAsSystem.Windows.Forms.Button
  FriendWithEventsCreateViewBtnAsSystem.Windows.Forms.Button
  FriendWithEventsbtnAlterTableAsSystem.Windows.Forms.Button
  FriendWithEventsbtnCreateOthersAsSystem.Windows.Forms.Button
  FriendWithEventsbtnDropTableAsSystem.Windows.Forms.Button
  FriendWithEventsbtnViewDataAsSystem.Windows.Forms.Button
  FriendWithEventsbtnViewSPAsSystem.Windows.Forms.Button
  FriendWithEventsbtnViewViewAsSystem.Windows.Forms.Button
  PrivateSubInitializeComponent()


  復制代碼 代碼如下:
Me.CreateDBBtn=NewSystem.Windows.Forms.Button()
  Me.CreateTableBtn=NewSystem.Windows.Forms.Button()
  Me.CreateSPBtn=NewSystem.Windows.Forms.Button()
  Me.CreateViewBtn=NewSystem.Windows.Forms.Button()
  Me.btnAlterTable=NewSystem.Windows.Forms.Button()
  Me.btnCreateOthers=NewSystem.Windows.Forms.Button()
  Me.btnDropTable=NewSystem.Windows.Forms.Button()
  Me.btnViewData=NewSystem.Windows.Forms.Button()
  Me.btnViewSP=NewSystem.Windows.Forms.Button()
  Me.btnViewView=NewSystem.Windows.Forms.Button()
  Me.DataGrid1=NewSystem.Windows.Forms.DataGrid()
  CType(Me.DataGrid1,System.ComponentModel.ISupportInitialize).BeginInit()
  Me.SuspendLayout()
  '
  'CreateDBBtn
  '
  Me.CreateDBBtn.Location=NewSystem.Drawing.Point(19,9)
  Me.CreateDBBtn.Name="CreateDBBtn"
  Me.CreateDBBtn.Size=NewSystem.Drawing.Size(104,23)
  Me.CreateDBBtn.TabIndex=0
  Me.CreateDBBtn.Text="創建數據庫"
  '
  'CreateTableBtn
  '
  Me.CreateTableBtn.Location=NewSystem.Drawing.Point(139,9)
  Me.CreateTableBtn.Name="CreateTableBtn"
  Me.CreateTableBtn.TabIndex=1
  Me.CreateTableBtn.Text="創建表"
  '
  'CreateSPBtn
  '
  Me.CreateSPBtn.Location=NewSystem.Drawing.Point(230,9)
  Me.CreateSPBtn.Name="CreateSPBtn"
  Me.CreateSPBtn.Size=NewSystem.Drawing.Size(104,23)
  Me.CreateSPBtn.TabIndex=2
  Me.CreateSPBtn.Text="創建存儲過程"
  '
  'CreateViewBtn
  '
  Me.CreateViewBtn.Location=NewSystem.Drawing.Point(350,9)
  Me.CreateViewBtn.Name="CreateViewBtn"
  Me.CreateViewBtn.TabIndex=3中國網管聯盟www.bitscn.com
  Me.CreateViewBtn.Text="創建視圖"
  '
  'btnAlterTable
  '
  Me.btnAlterTable.Location=NewSystem.Drawing.Point(441,9)
  Me.btnAlterTable.Name="btnAlterTable"
  Me.btnAlterTable.TabIndex=4
  Me.btnAlterTable.Text="修改表"

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved