473,657 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML to XML using XSL. Please, help me! Thank You!

Hello,

I am for days trying to apply a XSL transformation to a XML file and
display the result in a the browser. I am using Asp.Net 2.0.

Please, could someone post just a simple code example, either C# or
VB.NET, that I can try.

Thank You Very Much,

Miguel

Nov 17 '06 #1
2 1963
Here is an example I had around. My xml is "excel flavored", but you should
be able to pick up the points.

1. I start with a source xml called "start out" xml
2. I supply the xsl.
3. I apply the xsl to the xml.
4. It results in ~another xml file.

If this isn't what you're after, then you need to describe your issue a
little more in detail.

Good luck, I think this will help.

-------------------"START OUT" XML--------------------------------

<?xml version="1.0"?>
<?mso-application progid="Excel.S heet"?>
<Workbook xmlns="urn:sche mas-microsoft-com:office:spre adsheet"
xmlns:o="urn:sc hemas-microsoft-com:office:offi ce"
xmlns:x="urn:sc hemas-microsoft-com:office:exce l"
xmlns:ss="urn:s chemas-microsoft-com:office:spre adsheet"
xmlns:html="htt p://www.w3.org/TR/REC-html40">
<DocumentProper ties xmlns="urn:sche mas-microsoft-com:office:offi ce">
<Author>shollid ay</Author>
<LastAuthor>nam e</LastAuthor>
<Created>2003-12-22T18:58:08Z</Created>
<LastSaved>20 03-12-23T15:51:38Z</LastSaved>
<Company>organi zation</Company>
<Version>11.810 7</Version>
</DocumentPropert ies>
<ExcelWorkboo k xmlns="urn:sche mas-microsoft-com:office:exce l">
<WindowHeight>8 835</WindowHeight>
<WindowWidth>11 340</WindowWidth>
<WindowTopX>480 </WindowTopX>
<WindowTopY>120 </WindowTopY>
<ProtectStructu re>False</ProtectStructur e>
<ProtectWindows >False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal ">
<Alignment ss:Vertical="Bo ttom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1 ">
<Table ss:ExpandedColu mnCount="8" ss:ExpandedRowC ount="4"
x:FullColumns=" 1"
x:FullRows="1">
<Column ss:Index="2" ss:AutoFitWidth ="0" ss:Width="78"/>
<Column ss:AutoFitWidth ="0" ss:Width="71.25 "/>
<Column ss:AutoFitWidth ="0" ss:Width="72"/>
<Column ss:Index="6" ss:AutoFitWidth ="0" ss:Width="54.75 "/>
<Column ss:AutoFitWidth ="0" ss:Width="60.75 "/>
<Row>
<Cell><Data ss:Type="String ">myuid</Data></Cell>
<Cell><Data ss:Type="String ">mylastnam e</Data></Cell>
<Cell><Data ss:Type="String ">myfirstna me</Data></Cell>
<Cell><Data ss:Type="String ">myaddress 1</Data></Cell>
<Cell><Data ss:Type="String ">mycity</Data></Cell>
<Cell><Data ss:Type="String ">mystate</Data></Cell>
<Cell><Data ss:Type="String ">myzip</Data></Cell>
<Cell><Data ss:Type="String ">mygender</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number ">123</Data></Cell>
<Cell><Data ss:Type="String ">smith</Data></Cell>
<Cell><Data ss:Type="String ">john</Data></Cell>
<Cell><Data ss:Type="String ">123 main</Data></Cell>
<Cell><Data ss:Type="String ">charlotte </Data></Cell>
<Cell><Data ss:Type="String ">nc</Data></Cell>
<Cell><Data ss:Type="Number ">55555</Data></Cell>
<Cell><Data ss:Type="String ">M</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number ">234</Data></Cell>
<Cell><Data ss:Type="String ">jones</Data></Cell>
<Cell><Data ss:Type="String ">mary</Data></Cell>
<Cell><Data ss:Type="String ">543 hickory</Data></Cell>
<Cell><Data ss:Type="String ">statesvil le</Data></Cell>
<Cell><Data ss:Type="String ">nc</Data></Cell>
<Cell><Data ss:Type="Number ">44444</Data></Cell>
<Cell><Data ss:Type="String ">F</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number ">345</Data></Cell>
<Cell><Data ss:Type="String ">moore</Data></Cell>
<Cell><Data ss:Type="String ">pat</Data></Cell>
<Cell><Data ss:Type="String ">342 sycamore</Data></Cell>
<Cell><Data ss:Type="String ">asheville </Data></Cell>
<Cell><Data ss:Type="String ">nc</Data></Cell>
<Cell><Data ss:Type="Number ">33333</Data></Cell>
<Cell><Data ss:Type="String ">U</Data></Cell>
</Row>
</Table>
<WorksheetOptio ns xmlns="urn:sche mas-microsoft-com:office:exce l">
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveCol>1</ActiveCol>
</Pane>
</Panes>
<ProtectObjects >False</ProtectObjects>
<ProtectScenari os>False</ProtectScenario s>
</WorksheetOption s>
</Worksheet>
<Worksheet ss:Name="Sheet2 ">
<WorksheetOptio ns xmlns="urn:sche mas-microsoft-com:office:exce l">
<ProtectObjects >False</ProtectObjects>
<ProtectScenari os>False</ProtectScenario s>
</WorksheetOption s>
</Worksheet>
<Worksheet ss:Name="Sheet3 ">
<WorksheetOptio ns xmlns="urn:sche mas-microsoft-com:office:exce l">
<ProtectObjects >False</ProtectObjects>
<ProtectScenari os>False</ProtectScenario s>
</WorksheetOption s>
</Worksheet>
</Workbook>

---------------END----"START OUT" XML--------------------------------
-------- START XSL TO APPLY--------------------------

<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:o="urn:sc hemas-microsoft-com:office:offi ce"
xmlns:x="urn:sc hemas-microsoft-com:office:exce l"
xmlns:ss="urn:s chemas-microsoft-com:office:spre adsheet" >

<xsl:template match="/">
<OneWellDefined DS>
<!--<myRootPosition ><xsl:value-of select="positio n()"/></myRootPosition>-->
<xsl:apply-templates select="ss:Work book"/>
</OneWellDefinedD S>
</xsl:template>
<xsl:template match="ss:Workb ook">
<!--<myWorkbookPosi tion><xsl:value-of
select="positio n()"/></myWorkbookPosit ion>-->

<xsl:apply-templates select="ss:Work sheet"/>

</xsl:template>
<xsl:template match="ss:Works heet">
<!--<myWorksheetPos ition><xsl:valu e-of
select="positio n()"/></myWorksheetPosi tion>-->
<xsl:choose>
<xsl:when test="position( )=1">

<xsl:apply-templates select="ss:Tabl e"/>

</xsl:when>
<xsl:otherwis e>
</xsl:otherwise>

</xsl:choose>

</xsl:template>
<xsl:template match="ss:Table ">
<!--<myTablePositio n><xsl:value-of
select="positio n()"/></myTablePosition >-->
<xsl:apply-templates select="ss:Row"/>

</xsl:template>
<xsl:template match="ss:Row">
<!--<myRowPosition> <xsl:value-of select="positio n()"/></myRowPosition>-->
<xsl:choose>
<xsl:when test="position( )=1">

</xsl:when>
<xsl:otherwis e>
<customerInfo >
<!--<myPosition><xs l:value-of select="positio n()"/></myPosition>-->

<xsl:apply-templates select="ss:Cell "/>
</customerInfo>

</xsl:otherwise>

</xsl:choose>
</xsl:template>
<xsl:template match="ss:Cell" >


<!--<myCellPosition ><xsl:value-of
select="$varCur rentAttributePo sition"/></myCellPosition>-->

<xsl:choose>
<xsl:when test="position( )=1">
<xsl:call-template name="xuid" />
</xsl:when>
<xsl:when test="position( )=2">
<xsl:call-template name="xlastname " />
</xsl:when>

<xsl:when test="position( )=3">
<xsl:call-template name="xfirstnam e" />
</xsl:when>

<xsl:otherwis e>

</xsl:otherwise>

</xsl:choose>

</xsl:template>
<xsl:template name="xuid">
<uid><xsl:val ue-of select="."/></uid>
</xsl:template>

<xsl:template name="xlastname ">
<lastname><xsl: value-of select="."/></lastname>
</xsl:template>

<xsl:template name="xfirstnam e">
<firstname><xsl :value-of select="."/></firstname>
</xsl:template>


</xsl:stylesheet>

-------- END XSL TO APPLY--------------------------

C# Code START (this will probably show as deprecated, but that's what I had
at the time.. alter as necessary)
public void DoTranslation(s tring xmlFile, string xslFile, string outputFile)

{

try

{

//Create a new XslTransform object.

XslTransform xslt = new XslTransform();

//Load the stylesheet.

xslt.Load(xslFi le);

//Create a new XPathDocument and load the XML data to be transformed.

XPathDocument mydata = new XPathDocument(x mlFile);

//Create an XmlTextWriter which outputs to the console.

//XmlWriter writer = new XmlTextWriter(C onsole.Out);

//Transform the data and send the output to the console.

//xslt.Transform( mydata,null,wri ter, null);

xslt.Transform (xmlFile, outputFile);

}

catch (Exception ex)

{

debugMsg = ex.Message;

Console.WriteLi ne (debugMsg);

}

}



------------ Expected Result ( you shouldn't need this ... as the xsl
transformation above should create the xml below ,,, I put it here as a
reference )

<?xml version="1.0" encoding="utf-8" ?>
- <OneWellDefined DS xmlns:o="urn:sc hemas-microsoft-com:office:offi ce"
xmlns:x="urn:sc hemas-microsoft-com:office:exce l"
xmlns:ss="urn:s chemas-microsoft-com:office:spre adsheet">
- <customerInfo >
<uid>123</uid>
<lastname>smith </lastname>
<firstname>john </firstname>
</customerInfo>
- <customerInfo >
<uid>234</uid>
<lastname>jones </lastname>
<firstname>mary </firstname>
</customerInfo>
- <customerInfo >
<uid>345</uid>
<lastname>moore </lastname>
<firstname>pa t</firstname>
</customerInfo>
</OneWellDefinedD S>
Nov 17 '06 #2
Hi Sloan,

I followed your example and some information I found in internet and I
created a new version of my code and now I get the following:

This XML file does not appear to have any style information
associated with it. The document tree is shown below.
<urlset/>

This is really driving me crazy.

Do you or anyone else knows how to solve this?

----- New VB.NET code -----

' Create and load XSL document
Dim xslGoogle As XslCompiledTran sform = New XslCompiledTran sform

xslGoogle.Load( HttpContext.Cur rent.Server.Map Path(Configurat ionManager.AppS ettings("By27.A ssets")
& "/_Web/Google/SiteMap.xsl"))

' Create xpath document with XML document
Dim xpathGoogle As System.Xml.XPat h.XPathDocument = New
System.Xml.XPat h.XPathDocument (HttpContext.Cu rrent.Server.Ma pPath("~/Web.sitemap")

' Create memory stream
Dim msGoogle As System.IO.Strea m = New System.IO.Memor yStream

' Create XSL arguments list
Dim googleXslArgume nts As XsltArgumentLis t = New XsltArgumentLis t
googleXslArgume nts.AddParam("D omain", "",
"http://www.domain.com" )

' Transform XML document
xslGoogle.Trans form(xpathGoogl e, googleXslArgume nts, msGoogle)

' Flush the stream and set the position to 0
msGoogle.Flush( )
msGoogle.Positi on = 0

' Create stream reader
Dim srGoogle As System.IO.Strea mReader = New
System.IO.Strea mReader(msGoogl e)

' Display XML in browser
context.Respons e.Clear()
context.Respons e.ContentType = "text/xml; charset=utf-8"
context.Respons e.Write(srGoogl e.ReadToEnd)
context.Respons e.End()
---- XSL code ----

<?xml version="1.0" encoding="utf-8"?>
<xsl:styleshe et
version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:dk="http://schemas.microso ft.com/AspNet/SiteMap-File-1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
<xsl:param name="Domain"/>
<xsl:template match="dk:*"/>
<xsl:template match="@*|text( )|comment()"/>
<xsl:template match="/">
<xsl:element name="urlset">
<xsl:apply-templates select="//dk:siteMapNode[@google='true']"/>
</xsl:element>
</xsl:template>
<xsl:template match="dk:siteM apNode">
<xsl:element name="url">
<xsl:element name="loc">
<xsl:value-of select="$Domain " />
<xsl:value-of select="substri ng(@url, 3)"/>
</xsl:element>
<xsl:element name="lastmod">
<xsl:value-of select="@lastmo d"/>
</xsl:element>
<xsl:element name="changefre q">
<xsl:value-of select="@change freq"/>
</xsl:element>
<xsl:element name="priority" >
<xsl:value-of select="@priori ty"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

Thank You Very Much,

Miguel
sloan wrote:
Here is an example I had around. My xml is "excel flavored", but you should
be able to pick up the points.

1. I start with a source xml called "start out" xml
2. I supply the xsl.
3. I apply the xsl to the xml.
4. It results in ~another xml file.

If this isn't what you're after, then you need to describe your issue a
little more in detail.

Good luck, I think this will help.

-------------------"START OUT" XML--------------------------------

<?xml version="1.0"?>
<?mso-application progid="Excel.S heet"?>
<Workbook xmlns="urn:sche mas-microsoft-com:office:spre adsheet"
xmlns:o="urn:sc hemas-microsoft-com:office:offi ce"
xmlns:x="urn:sc hemas-microsoft-com:office:exce l"
xmlns:ss="urn:s chemas-microsoft-com:office:spre adsheet"
xmlns:html="htt p://www.w3.org/TR/REC-html40">
<DocumentProper ties xmlns="urn:sche mas-microsoft-com:office:offi ce">
<Author>shollid ay</Author>
<LastAuthor>nam e</LastAuthor>
<Created>2003-12-22T18:58:08Z</Created>
<LastSaved>20 03-12-23T15:51:38Z</LastSaved>
<Company>organi zation</Company>
<Version>11.810 7</Version>
</DocumentPropert ies>
<ExcelWorkboo k xmlns="urn:sche mas-microsoft-com:office:exce l">
<WindowHeight>8 835</WindowHeight>
<WindowWidth>11 340</WindowWidth>
<WindowTopX>480 </WindowTopX>
<WindowTopY>120 </WindowTopY>
<ProtectStructu re>False</ProtectStructur e>
<ProtectWindows >False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal ">
<Alignment ss:Vertical="Bo ttom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1 ">
<Table ss:ExpandedColu mnCount="8" ss:ExpandedRowC ount="4"
x:FullColumns=" 1"
x:FullRows="1">
<Column ss:Index="2" ss:AutoFitWidth ="0" ss:Width="78"/>
<Column ss:AutoFitWidth ="0" ss:Width="71.25 "/>
<Column ss:AutoFitWidth ="0" ss:Width="72"/>
<Column ss:Index="6" ss:AutoFitWidth ="0" ss:Width="54.75 "/>
<Column ss:AutoFitWidth ="0" ss:Width="60.75 "/>
<Row>
<Cell><Data ss:Type="String ">myuid</Data></Cell>
<Cell><Data ss:Type="String ">mylastnam e</Data></Cell>
<Cell><Data ss:Type="String ">myfirstna me</Data></Cell>
<Cell><Data ss:Type="String ">myaddress 1</Data></Cell>
<Cell><Data ss:Type="String ">mycity</Data></Cell>
<Cell><Data ss:Type="String ">mystate</Data></Cell>
<Cell><Data ss:Type="String ">myzip</Data></Cell>
<Cell><Data ss:Type="String ">mygender</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number ">123</Data></Cell>
<Cell><Data ss:Type="String ">smith</Data></Cell>
<Cell><Data ss:Type="String ">john</Data></Cell>
<Cell><Data ss:Type="String ">123 main</Data></Cell>
<Cell><Data ss:Type="String ">charlotte </Data></Cell>
<Cell><Data ss:Type="String ">nc</Data></Cell>
<Cell><Data ss:Type="Number ">55555</Data></Cell>
<Cell><Data ss:Type="String ">M</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number ">234</Data></Cell>
<Cell><Data ss:Type="String ">jones</Data></Cell>
<Cell><Data ss:Type="String ">mary</Data></Cell>
<Cell><Data ss:Type="String ">543 hickory</Data></Cell>
<Cell><Data ss:Type="String ">statesvil le</Data></Cell>
<Cell><Data ss:Type="String ">nc</Data></Cell>
<Cell><Data ss:Type="Number ">44444</Data></Cell>
<Cell><Data ss:Type="String ">F</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number ">345</Data></Cell>
<Cell><Data ss:Type="String ">moore</Data></Cell>
<Cell><Data ss:Type="String ">pat</Data></Cell>
<Cell><Data ss:Type="String ">342 sycamore</Data></Cell>
<Cell><Data ss:Type="String ">asheville </Data></Cell>
<Cell><Data ss:Type="String ">nc</Data></Cell>
<Cell><Data ss:Type="Number ">33333</Data></Cell>
<Cell><Data ss:Type="String ">U</Data></Cell>
</Row>
</Table>
<WorksheetOptio ns xmlns="urn:sche mas-microsoft-com:office:exce l">
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveCol>1</ActiveCol>
</Pane>
</Panes>
<ProtectObjects >False</ProtectObjects>
<ProtectScenari os>False</ProtectScenario s>
</WorksheetOption s>
</Worksheet>
<Worksheet ss:Name="Sheet2 ">
<WorksheetOptio ns xmlns="urn:sche mas-microsoft-com:office:exce l">
<ProtectObjects >False</ProtectObjects>
<ProtectScenari os>False</ProtectScenario s>
</WorksheetOption s>
</Worksheet>
<Worksheet ss:Name="Sheet3 ">
<WorksheetOptio ns xmlns="urn:sche mas-microsoft-com:office:exce l">
<ProtectObjects >False</ProtectObjects>
<ProtectScenari os>False</ProtectScenario s>
</WorksheetOption s>
</Worksheet>
</Workbook>

---------------END----"START OUT" XML--------------------------------
-------- START XSL TO APPLY--------------------------

<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:o="urn:sc hemas-microsoft-com:office:offi ce"
xmlns:x="urn:sc hemas-microsoft-com:office:exce l"
xmlns:ss="urn:s chemas-microsoft-com:office:spre adsheet" >

<xsl:template match="/">
<OneWellDefined DS>
<!--<myRootPosition ><xsl:value-of select="positio n()"/></myRootPosition>-->
<xsl:apply-templates select="ss:Work book"/>
</OneWellDefinedD S>
</xsl:template>
<xsl:template match="ss:Workb ook">
<!--<myWorkbookPosi tion><xsl:value-of
select="positio n()"/></myWorkbookPosit ion>-->

<xsl:apply-templates select="ss:Work sheet"/>

</xsl:template>
<xsl:template match="ss:Works heet">
<!--<myWorksheetPos ition><xsl:valu e-of
select="positio n()"/></myWorksheetPosi tion>-->
<xsl:choose>
<xsl:when test="position( )=1">

<xsl:apply-templates select="ss:Tabl e"/>

</xsl:when>
<xsl:otherwis e>
</xsl:otherwise>

</xsl:choose>

</xsl:template>
<xsl:template match="ss:Table ">
<!--<myTablePositio n><xsl:value-of
select="positio n()"/></myTablePosition >-->
<xsl:apply-templates select="ss:Row"/>

</xsl:template>
<xsl:template match="ss:Row">
<!--<myRowPosition> <xsl:value-of select="positio n()"/></myRowPosition>-->
<xsl:choose>
<xsl:when test="position( )=1">

</xsl:when>
<xsl:otherwis e>
<customerInfo >
<!--<myPosition><xs l:value-of select="positio n()"/></myPosition>-->

<xsl:apply-templates select="ss:Cell "/>
</customerInfo>

</xsl:otherwise>

</xsl:choose>
</xsl:template>
<xsl:template match="ss:Cell" >


<!--<myCellPosition ><xsl:value-of
select="$varCur rentAttributePo sition"/></myCellPosition>-->

<xsl:choose>
<xsl:when test="position( )=1">
<xsl:call-template name="xuid" />
</xsl:when>
<xsl:when test="position( )=2">
<xsl:call-template name="xlastname " />
</xsl:when>

<xsl:when test="position( )=3">
<xsl:call-template name="xfirstnam e" />
</xsl:when>

<xsl:otherwis e>

</xsl:otherwise>

</xsl:choose>

</xsl:template>
<xsl:template name="xuid">
<uid><xsl:val ue-of select="."/></uid>
</xsl:template>

<xsl:template name="xlastname ">
<lastname><xsl: value-of select="."/></lastname>
</xsl:template>

<xsl:template name="xfirstnam e">
<firstname><xsl :value-of select="."/></firstname>
</xsl:template>


</xsl:stylesheet>

-------- END XSL TO APPLY--------------------------

C# Code START (this will probably show as deprecated, but that's what I had
at the time.. alter as necessary)
public void DoTranslation(s tring xmlFile, string xslFile, string outputFile)

{

try

{

//Create a new XslTransform object.

XslTransform xslt = new XslTransform();

//Load the stylesheet.

xslt.Load(xslFi le);

//Create a new XPathDocument and load the XML data to be transformed.

XPathDocument mydata = new XPathDocument(x mlFile);

//Create an XmlTextWriter which outputs to the console.

//XmlWriter writer = new XmlTextWriter(C onsole.Out);

//Transform the data and send the output to the console.

//xslt.Transform( mydata,null,wri ter, null);

xslt.Transform (xmlFile, outputFile);

}

catch (Exception ex)

{

debugMsg = ex.Message;

Console.WriteLi ne (debugMsg);

}

}



------------ Expected Result ( you shouldn't need this ... as the xsl
transformation above should create the xml below ,,, I put it here as a
reference )

<?xml version="1.0" encoding="utf-8" ?>
- <OneWellDefined DS xmlns:o="urn:sc hemas-microsoft-com:office:offi ce"
xmlns:x="urn:sc hemas-microsoft-com:office:exce l"
xmlns:ss="urn:s chemas-microsoft-com:office:spre adsheet">
- <customerInfo >
<uid>123</uid>
<lastname>smith </lastname>
<firstname>john </firstname>
</customerInfo>
- <customerInfo >
<uid>234</uid>
<lastname>jones </lastname>
<firstname>mary </firstname>
</customerInfo>
- <customerInfo >
<uid>345</uid>
<lastname>moore </lastname>
<firstname>pa t</firstname>
</customerInfo>
</OneWellDefinedD S>
Nov 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6154
by: reddy | last post by:
I am trying to insert a node into an XMLFile. using XMLTextwriter. My Question is Is it possible to do without using XMLDocument. Because its loading all the the file into memory. I just want to insert in the front. My code is give below. Is it possible to do without using XMLDOcument? Dim masterDoc As String = Request.PhysicalApplicationPath & "PageViews.xml" Dim writer As XmlTextWriter = Nothing
4
4748
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record onto the bottom of the list (even though it keeps its record number). Also, There are certin names that i click on the list, and it will not bring it up, rather it brings to the first record (no matter how many times i try going to that...
9
3066
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want to appear in the report is Yes, No, or Maybe. What do I need to do to change what appears in the report/what term do I need to search out in Google? Thank you Colin
4
7892
by: Popoxinhxan | last post by:
I would like to develop the form which allow expanable similar to the window address book application. Which enable you to enter the keyword and press the search button then the main form expand including the dataset.COuld any one show me how to do this. Thank you
8
2574
by: FS Liu | last post by:
Hi, I am writing ATL Service application (XML Web service) in VS.NET C++. Are there any sample programs that accept XML as input and XML as output in the web service? Thank you very much.
3
4903
by: roopsd | last post by:
I am using VS.NET 2003 with crystal reports XI release 2. I get a runtime error at the following line: oRptForm.crystalReportViewer.ReportSource = oReport An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll If I put the following statement inside a try catch block, it gives me
11
6029
by: imani_technology_spam | last post by:
The table in the database has a field called LabID. That field is an integer and consists of the year plus a counter. For example, the first record of 2006 would be "20060001," the second record of 2006 would be "20060002" and so on. I'm trying to create an Insert trigger that can generate the ID value when a new record is inserted, but I'm not quite sure how to implement that trigger. Can anyone help?
11
8159
by: TokyoJ | last post by:
I run a small camp in Alaska for kids and my director is asking for a web form. Could someone please have a look and offer some advice on where I'm making mistake(s)? I'm using the RegExp function to validate 3 types of fields: text, radio button, dropdown menu. but the code doesn't validate. After 2 days, it's time I asked for guidence. Criteria: Text: only alphabet, no numerals, allowed Radio: one must be selected, Dropdown: an option...
0
1656
by: qwer | last post by:
Hi... I need to do a flow chart diagram using VB. As usual, I'm doing my car park system. So this is how it should look like: Upon arrival... 1) The user will see these messages - "Welcome to Paperless Car Park!" 2) "Before entering, please SMS your vehicle number to ..." (The ... is the SIM card in the GSM modem) 3) "Thank you. Your car plate number is ..." (The ... is the car plate number) 4) "Your IN time is __:__hrs"
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.