Solved

XML/XSLT Rendering problem

Posted on 2013-02-07
9
429 Views
Last Modified: 2013-02-08
I have a process that uses a string variable and sets it to a string coming out of SQL Server.
The string is actually an Employment Application rendered as XML using XSLT

The variable is then displayed in a browser control in MS Access 2003

My process works in tens of thousands and thousands of cases

However...
In a couple of cases...when the string variable is VERY long...the Web Browser shows theres a xml error with invalid characters.

So...
Is there a physical limit on what a string variable can be set to?

Here is (partially) the code that displays the XML in the Web Browser control

Private Sub Form_Current()
    'This cannot be in Form Load...as Active-X COntrol Loads First
    Dim strURL As String
    Dim objIE As Object

    strURL = "C:\NNTEMP\FullApp.xml"
    Set objIE = Me.Frame1.object
    objIE.navigate strURL
End Sub

Private Sub Form_Load()
    Dim strXML As String
    Dim cmd As New ADODB.Command
    Dim retSet As ADODB.Recordset
    Dim intPos As Integer
    Dim strID As String
    Dim strCreatedDate As String
    
    If Len(Me.OpenArgs) > 0 Then
        'Set variable values
        intPos = InStr(Me.OpenArgs, "|")
        strID = Left$(Me.OpenArgs, intPos - 1)
        strCreatedDate = Mid$(Me.OpenArgs, intPos + 1)
         'Create record in database
        Set cmd.ActiveConnection = Conn
        cmd.CommandType = adCmdStoredProc
        cmd.CommandText = "usp_FullAppXMLget"
        cmd.Parameters("@id") = strID
        Set retSet = cmd.Execute
        
        If Not retSet.EOF Then
            strXML = retSet![XmlDoc]
        End If
        'Close out connections and recordsets
        Set cmd = Nothing
        Set retSet = Nothing
        
        lblHeader.Caption = "Created on " & strCreatedDate

        'This creates a file
        Open "C:\NNTEMP\FullApp.xml" For Output As #1
        Print #1, strXML
        Close #1    Else
        lblHeader.Caption = "No Data to Load"
    End If
    
    'This creates file on run does as well
    'With CreateObject("ADODB.Stream")
    '.Type = 2
    '.Charset = "utf-16"
    '.Open
    '.WriteText sXML
    '.SaveToFile sFilename, 2
    '.Close
    'End With
    
End Sub

Open in new window

0
Comment
Question by:lrbrister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 48

Expert Comment

by:PortletPaul
ID: 38866473
sorry - let's play 20 questions:

what version of: Sql Server, Access and IE?
how big is "very big"?
Can you get to the xml file directly?
Is the xml well formed?
Is the file UTF8? (if not what encoding?)

can you upload one of these files? (don't edit it if possible, if you must edit use something like Notepad++ and don't change the encoding. Please indicate if yo have edited the file.)
0
 

Author Comment

by:lrbrister
ID: 38867779
SQL Server 2005
MS Access 2003
In Access it's the Web Browser Control
XML is fine.  If I take and place it in Visual Studio and "View in  Browser" it renders just fine.
Also...the other 10's of thousands of Applications can open with the same process.

That's why I'm wondering if the MS Access Web Browser Control has a physical limit?
This is what the control looks like on the Form

SP
0
 
LVL 84
ID: 38868480
If you take the XML you output at C:\NNTEMP\FullApp.xml and run it through a validator does everything work as expected?

Note the other question here: http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_28023644.html#a38868470
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:lrbrister
ID: 38868591
LSMConsulting
I ran it through the validator at http://www.w3schools.com/xml/xml_validator.asp and it's fine.

There MUST be some kind of MS Access 2003 Web Browser control
0
 
LVL 84
ID: 38868642
There are very few controls certified to work in the Access environment. In general, if you need to work outside the boundaries of Access you should move up to .NET or some other appropriate language.

What are you referring to here:

the other 10's of thousands of Applications can open with the same process.
Do you have this same process running in other deployments and are having troubles with only a handful of machines? Or are you referring to something else?
0
 

Author Comment

by:lrbrister
ID: 38868723
LSM Consulting

I agree and am trying to get the customer to move to .Net

In the meantime, This Access application is an ADP.
Each user at login gets a copy on their desktop

They review countless numbers of Employment Applications - all using this process.

About 1/10th of 1% have an issue rendering.
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 38868746
So you have other machines running the same FE, and some will error ON THE SAME RECORD while others do not error ON THE SAME RECORD?

If so, then you obviously have issues with those machines regarding the installation of Office, Windows, or Internet Explorer (or one of the dependent libraries). Note too that sometime a corrupt user profile can cause issues like this - to test that, try logging in as a different user on a machine that exhibits this behavior.

You can try a repair/reinstall of Office and/or Windows on a machine having issues. That would tell you if doing so would resolve the issues.
0
 

Author Comment

by:lrbrister
ID: 38868775
LSMConsulting

I'll have the Network/Office team do a MS Office setup again
0
 

Author Closing Comment

by:lrbrister
ID: 38869219
Old machines were the ones having a problem.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question