Editing Create an SQL Command from an existing Table Adapter
Jump to:
navigation
,
search
You have an existing table adapter, and need to execute a specific SQL command on that table. Here's a Sub that does a Truncate Table: Public Sub TruncateTable() Dim MyOwn_TA As New MyOwn_DataSetTableAdapters.MyOwn_FullDataHarvestTableAdapter MyOwn_TA.Connection.Open() Dim TruncateCmd As SqlCommand = MyOwn_TA.Connection.CreateCommand TruncateCmd.CommandText = "truncate table [MyOwn_FullDataHarvest]" TruncateCmd.ExecuteNonQuery() MyOwn_TA.Connection.Close() End Sub
|
Editing help
Personal tools
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
Actions
Search
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Toolbox
What links here
Related changes
Special pages