-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 4510453
Showing
19 changed files
with
1,140 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,58 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
|
||
// | ||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
// | ||
[assembly: AssemblyTitle("Foam")] | ||
[assembly: AssemblyDescription("Parses an XML document and turns it into a properly formatted MS SQL Server 2000 stored procedure for use with FOR XML EXPLICIT")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("digital nothing design\r\nwww.digitalnothing.com")] | ||
[assembly: AssemblyProduct("")] | ||
[assembly: AssemblyCopyright("")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// | ||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Revision and Build Numbers | ||
// by using the '*' as shown below: | ||
|
||
[assembly: AssemblyVersion("1.1.2")] | ||
|
||
// | ||
// In order to sign your assembly you must specify a key to use. Refer to the | ||
// Microsoft .NET Framework documentation for more information on assembly signing. | ||
// | ||
// Use the attributes below to control which key is used for signing. | ||
// | ||
// Notes: | ||
// (*) If no key is specified, the assembly is not signed. | ||
// (*) KeyName refers to a key that has been installed in the Crypto Service | ||
// Provider (CSP) on your machine. KeyFile refers to a file which contains | ||
// a key. | ||
// (*) If the KeyFile and the KeyName values are both specified, the | ||
// following processing occurs: | ||
// (1) If the KeyName can be found in the CSP, that key is used. | ||
// (2) If the KeyName does not exist and the KeyFile does exist, the key | ||
// in the KeyFile is installed into the CSP and used. | ||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. | ||
// When specifying the KeyFile, the location of the KeyFile should be | ||
// relative to the project output directory which is | ||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is | ||
// located in the project directory, you would specify the AssemblyKeyFile | ||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] | ||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework | ||
// documentation for more information on this. | ||
// | ||
[assembly: AssemblyDelaySign(false)] | ||
[assembly: AssemblyKeyFile("")] | ||
[assembly: AssemblyKeyName("")] |
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,29 @@ | ||
----------- ChangeLog.txt ------------ | ||
Application Name: Foam.exe | ||
Developer: digital nothing design | ||
Current Version: 1.1.0 | ||
Download Latest Version: http://www.digitalnothing.com/Downloads/Tools/Foam.zip | ||
|
||
======================================================================================================== | ||
08/29/2002 - v1.1.2 | ||
Fixed PopulateComboBoxes() to check that the tmpPath is not an empty string prior to parsing. | ||
|
||
======================================================================================================== | ||
08/04/2002 - v1.1.0 | ||
Added "New Procedure" button to clear out all fields and have a fresh slate for a new XML file. | ||
|
||
"Parse XML" will now prompt the user when clicked, asking if the user would like to clear out all | ||
fields, essentially creating a new procedure. If the user responds "No" then the existing data will | ||
be kept, but drop down options for ORDER BY and Constraint Clauses will be repopulated. The prompt | ||
will only appear if another document has already been parsed during the session. | ||
|
||
When an XML doc path is typed in, or attained using the Browse button, the file will be parsed | ||
automatically. | ||
|
||
======================================================================================================== | ||
08/03/2002 - v1.0.0 | ||
Released. | ||
|
||
======================================================================================================== | ||
|
||
"Have some Foam with your SOAP!" |
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,55 @@ | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProjectGuid>{A75C8031-827D-42D6-9867-3C6080402C56}</ProjectGuid> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<OutputType>WinExe</OutputType> | ||
<AssemblyName>Foam</AssemblyName> | ||
<OutputPath>./bin/Debug/</OutputPath> | ||
<DebugSymbols>True</DebugSymbols> | ||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
<Optimize>True</Optimize> | ||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> | ||
<DefineConstants> | ||
</DefineConstants> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputType>WinExe</OutputType> | ||
<AssemblyName>Foam</AssemblyName> | ||
<OutputPath>./bin/Release/</OutputPath> | ||
<DebugSymbols>False</DebugSymbols> | ||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
<Optimize>True</Optimize> | ||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> | ||
<DefineConstants> | ||
</DefineConstants> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
<Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | ||
<Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
<Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="./AssemblyInfo.cs" /> | ||
<Compile Include="./frmFoam.cs" /> | ||
<Compile Include="./frmSP.cs" /> | ||
<Compile Include="./SQLXML.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<EmbeddedResource Include="./frmFoam.resx"> | ||
<LogicalName>Foam.frmFoam.resources</LogicalName> | ||
<DependentUpon>frmFoam.cs</DependentUpon> | ||
</EmbeddedResource> | ||
<EmbeddedResource Include="./frmSP.resx"> | ||
<LogicalName>Foam.frmSP.resources</LogicalName> | ||
<DependentUpon>frmSP.cs</DependentUpon> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> | ||
</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,156 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > | ||
<HTML> | ||
<HEAD> | ||
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0"> | ||
<TITLE></TITLE> | ||
</HEAD> | ||
<BODY> | ||
<h1>Foam v1.1.2 - Help</h1> | ||
<hr> | ||
<h2>Table of Contents</h2> | ||
<ul> | ||
<li> | ||
<a href="#About">About Foam</a></li> | ||
<li> | ||
<a href="#Requirements">Requirements</a></li> | ||
<li> | ||
<a href="#Formatting">Formatting Your XML File</a></li> | ||
<li> | ||
<a href="#Use">Using Foam</a></li> | ||
<li> | ||
<a href="#Development">Development</a></li> | ||
<li> | ||
<a href="#Resources">FOR XML Resources</a></li> | ||
</ul> | ||
<hr> | ||
<a name="#About"></a> | ||
<h2>About Foam</h2> | ||
<p>Foam is a .Net Windows application that is used to ease the creation of FOR XML | ||
EXPLICIT queries for use with MS SQL Server 2000. Foam does this by taking an | ||
XML document that you have formatted according to the incredibly simple | ||
structure specified below, and then parsing through the document to create the | ||
appropriate FOR XML EXPLICIT structure. This is the absolute base functionality | ||
of Foam. | ||
<BR> | ||
<BR> | ||
With Foam, you can further specify parameters, constraints(FROM/WHERE clauses), | ||
and ORDER BY criteria. Foam will take the information that it has been given, | ||
and format it, and place it in the appropriate location for the stored | ||
procedure. | ||
<br> | ||
<br> | ||
While Foam cannot hope to cover all the snags of working with FOR XML EXPLICIT, | ||
it does have some rules built in to create the procedure structure as | ||
accurately as possible to minimize errors. The more information you provide | ||
Foam with, the less chance of errors and need for debugging there will be at | ||
the end. | ||
</p> | ||
<br> | ||
<a name="#Requirements"></a> | ||
<h2>Requirements</h2> | ||
<p>Foam requires that you have the Microsoft.Net Framework installed, and a | ||
resolution display of at least 800x600. | ||
<ul> | ||
<li> | ||
Download the .Net Framework: <a href="http://www.digitalnothing.com/downloads/tools/dotnetfx.exe"> | ||
dotnetfx.exe</a></li> | ||
</ul> | ||
</p> | ||
<br> | ||
<a name="#Formatting"></a> | ||
<h2>Formatting your XML File</h2> | ||
<p>Formatting an XML file for Foam is so simple a monkey could do it(well maybe if | ||
you had an infinite number of monkeys...)! To format an XML document for use | ||
with Foam, create the XML structure that you would like for your end output. | ||
Instead of placing actual data values in for attributes and elements, just | ||
place in the column, string, expression, etc... that you would like to have SQL | ||
Server use as the value. Look at the Sample.xml file that came with the | ||
Foam.zip file for an example of how to format your document.</p> | ||
<br> | ||
<a name="#Use"></a> | ||
<h2>Using Foam</h2> | ||
<p>First you will need to either type in or use the Browse button to locate the | ||
path to the XML document you wish to parse. After you have chosen the file you | ||
want to parse, you can specify the name you would like to use for the stored | ||
procedure.<br> | ||
<br> | ||
In the Parameters section you can add, edit, and remove parameters for the | ||
stored procedure. To add a parameter, specify a name, data type, and a length | ||
if necessary(no parentheses). Click Add / Edit when you are done. To edit a | ||
parameter click on that parameter's line in the parameters list. You may then | ||
change the data type, or length and click Add / Edit to save the changes. To | ||
remove, select the parameter you wish to remove from the list and click Remove. | ||
<BR> | ||
<BR> | ||
The above are the sections you can fill out before parsing the document you | ||
have selected. To make the ORDER BY, and Constraint Clauses groups available, | ||
you will need to click the Parse XML button. If the parsing of your document is | ||
successful, you will receive a message saying that parsing was successful. If | ||
the parsing failed, you will receive a failure message. A failure message | ||
indicates that the way you have formatted your document is not in line with | ||
what Foam was expecting. Please compare your document with Sample.xml as a | ||
reference.<br> | ||
<br> | ||
To add ORDER BY criteria to the procedure, select the path to the tag you wish | ||
to order by from the drop down, specify whether it should be ascending or | ||
descending, and click Add. To edit, or remove, follow the same pattern as | ||
described in the Parameters use information. You can move ordered fields up or | ||
down in the list to get the appropriate location for a field even if it was | ||
added at a later time. To do this, click on the field you want to change, and | ||
use the up or down arrow buttons to move the field. It is recommended that you | ||
add ORDER BY criteria for your procedure, this is because of the necessity to | ||
have the column being ordered by SELECTed in all UNIONs. For more information | ||
on how FOR XML EXPLICIT and ORDERing work you can read this article: | ||
http://www.sqlxml.org/faqs.aspx?faq=28<br> | ||
<br> | ||
To add Constraint Clauses(FROM/WHERE) choose the SELECT block from the drop | ||
down that the constraint will be attached to, add your constraints in the | ||
textbox, and click Add. To edit or remove a constraint, follow the pattern | ||
described in the Parameters use information.<br> | ||
<br> | ||
When you are satisfied with the data you have entered, you can click on the | ||
Build Procedure button. This will popup a new window from which you can copy or | ||
save the generated stored procedure. You always have the option of clicking on | ||
the Build Procedure button as long as you have specified the XML document you | ||
wish to parse. | ||
</p> | ||
<br> | ||
<a name="#Development"></a> | ||
<h2>Development</h2> | ||
<p>Foam was developed by digital nothing design, because creating FOR XML EXPLICIT | ||
queries from the ground up is a major pain in the rear! Anyone who has | ||
attempted such knows that this is fact, and not even remotely close to opinion. | ||
<ul> | ||
<li> | ||
Visit digital nothing design: <a href="http://www.digitalnothing.com/?foam">http://www.digitalnothing.com</a></li> | ||
<li> | ||
Email digital nothing design: <a href="mailto:[email protected]">[email protected]</a></li> | ||
<li> | ||
Download the latest version of Foam: <a href="http://www.digitalnothing.com/downloads/tools/foam.zip"> | ||
foam.zip</a></li> | ||
</ul> | ||
</p> | ||
<br> | ||
<a name="#Resources"></a> | ||
<h2>Resources</h2> | ||
<p>Below is a list of resources that you may find helpful while attempting to | ||
create FOR XML EXPLICIT stored procedures, or even your normal day to day SQL | ||
questions.</p> | ||
<br> | ||
<ul> | ||
<li> | ||
<a href="http://www.sqlteam.com">SQL Team</a> - Great articles, and forums with | ||
very helpful(read: extremly knowledgeable) regulars. Oh yeah, lots of Yak too!</li> | ||
<li> | ||
<a href="http://www.sqlxml.org">SQLXML</a> - Numerous FAQs dealing specifically | ||
with building, retrieving, and writing FOR XML queries.</li> | ||
<li> | ||
BOL(Books Online) - No link for this one. Just open up Query Analyzer and hit | ||
F1.</li> | ||
</ul> | ||
<br> | ||
<p>Now that you are finished reading this little bit of documentation, go have some | ||
Foam with your SOAP! ...I'll stop now. Have fun using Foam, hopefully you'll | ||
find it as useful as I have.</p> | ||
</BODY> | ||
</HTML> |
Empty file.
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,7 @@ | ||
<TestXML> | ||
<CustomerName>(SELECT Name FROM tblCustomers)</CustomerName> | ||
<OrderNumber>9</OrderNumber> | ||
<OrderLines TotalLines="SELECT COUNT(*) FROM tblOrderLines"> | ||
<OrderLine>Cheese</OrderLine> | ||
</OrderLines> | ||
</TestXML> |
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,20 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<Ads> | ||
<Ad AdId="1" AdPosted="2001-12-19T22:08:45"> | ||
<Title>Test Ad</Title> | ||
<AdBody>Test text, isn't it pretty?</AdBody> | ||
<Phone></Phone> | ||
<City></City> | ||
<State>Other</State> | ||
<Country></Country> | ||
</Ad> | ||
<Ad AdId="2" AdPosted="2001-12-19T22:11:42"><Title>It's so prett | ||
anonymous test for Reb</AdBody></Ad> | ||
<Ad AdId="1011" AdPosted="2002-02-19T23:01:39"> | ||
<Title>Feb Anon Test</Title> | ||
<AdBody>This is my anonymous test for Reb</AdBody> | ||
<Images> | ||
<Image ImageId="1" Path="../stuff.jpg" ImageName="1" /> | ||
</Images> | ||
</Ad> | ||
</Ads> |
Oops, something went wrong.