Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

XML/XSLT Rendering problem

Posted on 2013-02-07
9
Medium Priority
?
446 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 49

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 85
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
Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

 

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 85
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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

721 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