XML into a text field (form)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to take an XMLData argument from an ActiveX control and store
this XML in a field in Access. The XMLDATA is maybe 2000 characters long.

I would prefer to do this in ADP, not MDB.

I am trying to use a VARCHAR(7500) field.

I have it written correctly, but it is failing to put the whole string in
the text field (it is only showing like the last 30 chars).

I've been trying to troubleshoot this all morning, I could really use some
help

-aaron
 
Possible that the XMLData is not encoded in Ascii but in UTF-8. Try using a
varbinary or an image field instead.

If it is encoded in Unicode (UTF-16), use nvarchar or ntext.

S. L.
 
thank you i will give that a shot.

i have been writing the XML files to the filesystem in the meantime-- i
really hope I can get that working in the morning

-aaron
 
Can you send me your code??

I have been given the same assigment and i'm in deep trouble.

Thank you kindly
 
haha I really can't, man.. It's still a work in process... I'm basically
drawing it out using ADP connection to SQL Server; and then rewriting it via
ASP.

basically, you just need to save the XMLDATA property of the PivotTable
control

Save that either to a table, or to a database.. I'm trying to make
customizable reports-- so that people can save thier own report definitions.
 
sorry, i meant save it to a file, or save it to a database

Here is some simple code-- It is a lil more complicated on the ASP side of
the equation.

Private Sub cmdSaveToFile_Click()
On Error GoTo errhandler
'Me.PivotTable6.XMLDATA

Dim fso As New FileSystemObject
Dim s_path As String
Dim fout

If Len(Me.PATH) > 0 Then
s_path = Me.PATH
Else
s_path = ReportXmlPath(Me.REPORT_DEF_ID)
End If

Set fout = fso.CreateTextFile(s_path, True)
fout.Write Me.PivotTable6.XMLDATA
fout.Close

cleanexit:
Exit Sub
errhandler:
MsgBox Err.Number & " - " & Err.Description, vbOKOnly
Resume Next
End Sub


Public Function ReportXmlPath(I_ReportDefID As Integer) As String
On Error GoTo errhandler

ReportXmlPath = "C:\SITES\EPO2\XML\ReportDef_" & CStr(I_ReportDefID) &
".XML"

cleanexit:
Exit Function
errhandler:
MsgBox Err.Number & " - " & Err.Description, vbOKOnly
Resume Next
End Function



haha I really can't, man.. It's still a work in process... I'm basically
drawing it out using ADP connection to SQL Server; and then rewriting it via
ASP.

basically, you just need to save the XMLDATA property of the PivotTable
control

Save that either to a table, or to a database.. I'm trying to make
customizable reports-- so that people can save thier own report definitions.
 
Back
Top