Geeks With Blogs
Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done XML & Datasets
How To: Get the DISTINCT rows in a DataTable or DataView

How To: Get the DISTINCT rows in a DataTable or DataView

http://devpinoy.org/blogs/keithrull/archive/2008/02/07/how-to-get-the-distinct-rows-in-a-datatable-or-dataview.aspx

Posted On Tuesday, May 11, 2010 9:49 AM

Generic xmlTextReader
Generic xmlTextReader Original article: http://www.dotnetspider.com... ////-----------------------... ////convert XML string to MemoryStream ////-----------------------... MemoryStream memoryStream = new MemoryStream(); byte[] data = Encoding.Unicode.GetBytes(s... memoryStream.Write(data, 0, data.Length); memoryStream.Position = 0; ////-----------------------... ......

Posted On Wednesday, August 13, 2008 2:26 AM

Dataset to XML then transform with XSLT to HTML on WebForm
Private Sub GetXSLT() Try Dim parms As Specialized.HybridDictionary = New Specialized.HybridDictionary Dim df As New DataFactory Dim dataset As DataSet = df.GetDataSet("storedProc_G... parms) '--------------------------... 'Get the primary key column from the master table '--------------------------... Dim primarykey As DataColumn = dataset.Tables("Table").Col... '--------------------------... ......

Posted On Thursday, December 28, 2006 1:22 PM

XSLT to HTML Primer
XSLT to HTML Primer Rescuing XSLT from Niche Status - original article by David Jacobs http://www.xfront.com/rescu... This tutorial will focus on the generation of HTML documents. XSLT is a programming language for translating an Input XML Document into another format, say an HTML Output Document. For each element, you need to determine how the element needs to be translated. If there are one-to-one mappings or one to zero mappings, this is straightforward. For example, if every occurrence ......

Posted On Thursday, December 28, 2006 10:36 AM

indent xml with .NET
Original Article: http://bytes.com/forum/thre... Is there a simple way to indent xml with dotnet? SQL Server returns a long xml string that is hard > to read.[/color] XmlReader r = new XmlTextReader(new StringReader(myXML)); StringWriter sw = new StringWriter(); XmlTextWriter w = new XmlTextWriter(sw); w.Formatting = Formatting.Indented; while (r.Read()) w.WriteNode(r, false); w.Close(); r.Close(); Console.WriteLine(sw.ToStri... -- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com ......

Posted On Monday, August 11, 2008 2:09 AM

C# Different XML Extraction Techniques

C# Different XML Extraction Techniques

http://developer.yahoo.com/dotnet/howto-xml_cs.html

Posted On Monday, March 17, 2008 4:12 AM

Strongly Typed TableAdapters ASP.NET 2.0
Building a DAL using Strongly Typed TableAdapters and DataTables in VS 2005 and ASP.NET 2.0 Scott Mitchell's Masterpiece: http://www.asp.net/learn/da... http://weblogs.asp.net/scot... http://msdn2.microsoft.com/... http://aspalliance.com/914_... ......

Posted On Saturday, January 5, 2008 12:16 PM

How To Read XML Data into a DataSet by Using Visual C# .NET
How To Read XML Data into a DataSet by Using Visual C# .NET Original MSDN article: http://support.microsoft.co... public class XMLtoDataset { public static DataSet GetDatasetFromXMLString(string inString) { StringReader StringReader; XmlReader XmlReader = null; try { Console.WriteLine("Initiali... StringReader ..."); if (inString.IndexOf("<?xml version='1.0'?>") == -1) { inString = "<?xml version='1.0'?>" + inString; } //StringReader = new StringReader("<?xml version='1.0'?>" ......

Posted On Wednesday, December 19, 2007 8:21 AM

Get and Validate XML from WebSite and convert to Dataset
public bool GetDataFromWebSite() { bool myReturnBool = true; try { System.Net.WebRequest webRequest = System.Net.WebRequest.Creat... //-------------------------... // how to get your proxy from Internet Explorer // open Internet Explorer // Menu: Tools -> Internet Options // Connections Tab -> Lan Settings Button // copy and paste from "Address" text box e.g. < proxyServer.com > //-------------------------... ......

Posted On Tuesday, July 31, 2007 4:04 AM

ObjectDataSource could not find a non-generic method 'Update' that has parameters: ...., original_Id.
Problem: ObjectDataSource could not find a non-generic method 'Update' that has parameters: ...., original_Id. Take steps: 1) Change ObjectDataSource : OldValuesParameterFormatStr... to OldValuesParameterFormatStr... 2) Remove original_Id references from : (a) update stored proc (if automatically generated), (b) dataset (XSD) other links: http://geekswithblogs.net/c... ......

Posted On Friday, June 29, 2007 12:26 AM

ASP.NET 2.0 Fetching & Persisting Strongly Typed Datasets

Original Article by Scott Mitchell,

http://www.asp.net/learn/dataaccess/tutorial01cs.aspx?tabid=63

Posted On Thursday, June 7, 2007 8:12 AM

DataTable.DataTableReader example
public string _LogString_ViaDataReader { get { string x = ""; try { DataTableReader reader = _dsMarkit_log.MARKIT_LOG.Cr... StringBuilder sb = new StringBuilder(); while (reader.Read()) { // Given a DataTableReader, display column names. for (int i = 0; i < reader.FieldCount; i++) { sb.Append("\r\n" + reader.GetName(i) + ": "); if (reader.IsDBNull(i)) { sb.Append("<NULL>"); } else { try { sb.Append(reader.GetValue(i... } catch (InvalidCastException) { sb.Append("<Invalid ......

Posted On Wednesday, March 21, 2007 12:47 PM

wrap dataset storage in view state, in a property
public DataSet MyDataset{ get { //-------------------------... // get dataset from viewstate //-------------------------... DataSet localDataset = null; object o = ViewState["viewStateDataset"]; if (o == null) { //-------------------------... // ViewState is null, dataset get from Db //-------------------------... ......

Posted On Saturday, January 27, 2007 6:22 AM

ADO.NET and XML

An Introduction to the XML Tools in Visual Studio 2005

http://msdn2.microsoft.com/en-us/library/aa302298.aspx

original article by Xinjie ZHANG

http://www.codeproject.com/cs/database/ADONET_and_XML.asp

Posted On Tuesday, December 19, 2006 6:53 AM

webRequest, webRequest.Proxy, webResponse , XSD to validate webResponse , XSD to create and populate strongly-typed dataset
How To: Create webRequest set webRequest.Proxy fetch data from vendor via webResponse = webRequest.GetResponse(); use XSD to validate webResponse use XSD to create strongly-typed dataset strongly-typed dataset.ReadXML to populate strongly-typed dataset from webResponse Hopefully a vendor can send you some xml that looks like this: http://www.SomeVendor.com" xmlns:xsi="http://www.w3.or... xsi:schemaLocation="http://... LX010053 2006-09-26 LX010063 ......

Posted On Tuesday, September 26, 2006 10:34 AM

convert xml string to dataset & WriteXmlSchema to string
//convert xml string to dataset, and WriteXmlSchema to string System.IO. DataSet dsResponse = new DataSet();StringReader sr = new System.IO.StringReader(resp... sr = new System.IO.StreamReader( dsResponse.ReadXml(sr); System.Text. StringBuilder builder = new System.Text.StringBuilder();// Create the StringWriter object with the StringBuilder object. System.IO. StringWriter writer = new System.IO.StringWriter(buil... Write the schema into the StringWriter. dsResponse.WriteXmlSchema(w... ......

Posted On Wednesday, September 13, 2006 1:41 PM

Strong dataset returns empty tables plus unexpected populated tables.
Strong dataset returns empty tables plus unexpected populated tables. In example below, map unexpected table "Table" to expected table "dtUsage") In example below, map unexpected table Dim da As New SqlDataAdapter(cmdTest)Dim dsUserUsage As New dsUserUsageda.TableMappings... "dtUsage") da.TableMappings.Add("Table1", "dtDates") da.Fill(dsUserUsage) "Table1" to expected table "dtDates") ......

Posted On Tuesday, August 29, 2006 2:26 AM

Strong dataset returns empty tables plus unexpected populated tables.
Strong dataset returns empty tables plus unexpected populated tables. In example below, map unexpected table "Table" to expected table "dtUsage") In example below, map unexpected table Dim da As New SqlDataAdapter(cmdTest)Dim dsUserUsage As New dsUserUsageda.TableMappings... "dtUsage") da.TableMappings.Add("Table1", "dtDates") da.Fill(dsUserUsage) "Table1" to expected table "dtDates") ......

Posted On Tuesday, August 29, 2006 2:25 AM

Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net