-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
828 additions
and
22 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<Name>EfsPotato</Name> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectVersion>4.1</ProjectVersion> | ||
<ProjectGuid>{4836d6a4-f807-4e6a-887d-409bf1480017}</ProjectGuid> | ||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql100DatabaseSchemaProvider</DSP> | ||
<OutputType>Database</OutputType> | ||
<RootPath> | ||
</RootPath> | ||
<RootNamespace>EfsPotato</RootNamespace> | ||
<AssemblyName>EfsPotato</AssemblyName> | ||
<ModelCollation>1033, CI</ModelCollation> | ||
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure> | ||
<DeployToDatabase>True</DeployToDatabase> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<TargetLanguage>CS</TargetLanguage> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<SqlServerVerification>False</SqlServerVerification> | ||
<IncludeCompositeObjects>True</IncludeCompositeObjects> | ||
<TargetDatabaseSet>True</TargetDatabaseSet> | ||
<GenerateCreateScript>True</GenerateCreateScript> | ||
<PermissionSet>UNSAFE</PermissionSet> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<DefineDebug>false</DefineDebug> | ||
<DefineTrace>true</DefineTrace> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName> | ||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<DefineDebug>true</DefineDebug> | ||
<DefineTrace>true</DefineTrace> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion> | ||
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found --> | ||
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists> | ||
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> | ||
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> | ||
<ItemGroup> | ||
<Folder Include="Properties" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="SqlStoredProcedure1.cs" /> | ||
<Compile Include="EfsPotato.cs" /> | ||
<Compile Include="RowUtils.cs" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Microsoft.SqlServer.Server; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Text; | ||
|
||
namespace EfsPotato | ||
{ | ||
class RowUtils | ||
{ | ||
static public void SendAllRow(ArrayList alltext) | ||
{ | ||
|
||
string[] temparry = (string[])alltext.ToArray(typeof(string)); | ||
SqlDataRecord rec = new SqlDataRecord(new SqlMetaData[] { | ||
new SqlMetaData("output",SqlDbType.Text,-1) | ||
}); | ||
SqlContext.Pipe.SendResultsStart(rec); | ||
for (int i = 0; i < temparry.Length; i++) | ||
{ | ||
rec.SetSqlString(0, temparry[i]); | ||
SqlContext.Pipe.SendResultsRow(rec); | ||
} | ||
|
||
SqlContext.Pipe.SendResultsEnd(); | ||
|
||
} | ||
static public void SendOneRow(string text) | ||
{ | ||
|
||
SqlDataRecord rec = new SqlDataRecord(new SqlMetaData[] { | ||
new SqlMetaData("output",SqlDbType.Text,-1) | ||
}); | ||
SqlContext.Pipe.SendResultsStart(rec); | ||
rec.SetSqlString(0, text); | ||
SqlContext.Pipe.SendResultsRow(rec); | ||
SqlContext.Pipe.SendResultsEnd(); | ||
|
||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Data; | ||
using System.Data.SqlClient; | ||
using System.Data.SqlTypes; | ||
using Microsoft.SqlServer.Server; | ||
|
||
public partial class StoredProcedures | ||
{ | ||
[Microsoft.SqlServer.Server.SqlProcedure] | ||
public static void EfsPotatoCmd(string cmd) | ||
{ | ||
// 在此处放置代码 | ||
EfsPotato.EfsPotato.orgMain(cmd); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ enum ExecMethod | |
OACREATE, | ||
CLRCMD, | ||
CLRDEXEC, | ||
DBUP | ||
//EXEASM | ||
DBUP, | ||
DBUP2 | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.