Click here to Skip to main content
15,896,912 members
Articles / Database Development / SQL Server

Generate SQL Select, Insert, Update and Delete

Rate me:
Please Sign up or sign in to vote.
2.93/5 (10 votes)
29 Nov 2006CPOL2 min read 138.6K   4K   55  
This will generate a SQL Select Query, Insert Query, Update Query and Delete Query by selecting SQL Database Connection and Choose a table to generate the script for using in class or DataCommand.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{1EDBBFF1-AAF9-4ACA-BD19-077AC2F9D89B}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <StartupObject>GenerateSQL.My.MyApplication</StartupObject>
    <RootNamespace>GenerateSQL</RootNamespace>
    <AssemblyName>GenerateSQL</AssemblyName>
    <MyType>WindowsForms</MyType>
    <ApplicationIcon>Resources\NOTE16.ICO</ApplicationIcon>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>GenerateSQL.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>GenerateSQL.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Drawing" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Windows.Forms" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainForm.Designer.vb">
      <DependentUpon>MainForm.vb</DependentUpon>
    </Compile>
    <Compile Include="MainForm.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <Compile Include="SetupDBForm.Designer.vb">
      <DependentUpon>SetupDBForm.vb</DependentUpon>
    </Compile>
    <Compile Include="SetupDBForm.vb">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="SQLScriptNetModule.vb" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="MainForm.resx">
      <DependentUpon>MainForm.vb</DependentUpon>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="SetupDBForm.resx">
      <DependentUpon>SetupDBForm.vb</DependentUpon>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\New.gif" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\Save.gif" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\New1.gif" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\Rule1.gif" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\iPaste.gif" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\iCopy.gif" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Resources\iCut.gif" />
    <None Include="sqlcriptnet\sqlcriptnet_src.zip" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="Article.htm" />
    <Content Include="Resources\NOTE16.ICO" />
    <Content Include="mystyle.css" />
    <Content Include="sqlcriptnet\GenerateSQL.gif" />
    <Content Include="sqlcriptnet\SetupDBForm.gif" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Indonesia Indonesia
Sam is working on .Net technologies for a reputed IT company

Comments and Discussions