VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Saving information to an XML file format

by NBS Solutions (5 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 18th May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Saving information to an XML file format

Rate Saving information to an XML file format



Dim rsXML As New ADODB.Recordset
'create xmlfile
Dim cmpnm As String, strFile As String, i As Long, p As Long
i = cboReg(0).ListIndex
p = cboReg(1).ListIndex
strFile = App.Path & "\30q.nbs"
With rsXML
  .Fields.Append "LctnX", adChar, 20
  .Fields.Append "LctnXID", adChar, 20
  .Fields.Append "FunctionalityX", adChar, 20
  .Fields.Append "FunctionalityXID", adChar, 20
  .Fields.Append "CmptrNmX", adChar, 30
  .Fields.Append "IPX", adChar, 30, adFldIsNullable
  .Fields.Append "DtX", adChar, 20, adFldIsNullable
  .Fields.Append "NtPthX", adChar, 80, adFldIsNullable
  .Fields.Append "WNPthX", adChar, 80, adFldIsNullable
  .Fields.Append "LCLPthX", adChar, 80, adFldIsNullable
  .Fields.Append "FnNumX", adChar, 15, adFldIsNullable
  .Fields.Append "CreaterID", adChar, 20, adFldIsNullable
  .Fields.Append "address", adVariant, 250, adFldIsNullable
  cmpnm = Trim$(txtReg(1).Text)
  .Open
  .AddNew
  .Fields(0).Value = "North Shop"
  .Fields(1).Value = "Down Town"
  .Fields(2).Value = "13 the Ave"
  .Fields(3).Value = "NBS Solutions"
  .Fields(4).Value = "www.netnet.ca"
  .Fields(5).Value = "New Value"
  .Fields(6).Value = Date
  .Fields(7).Value = "N/A"
  .Fields(8).Value = "N/A"
  .Fields(9).Value = "N/A"
  .Fields(10).Value = "software @ netnet.ca"
  .Fields(11).Value = "1"
  .Fields(12).Value = "N/A"
  .Update
  .Save strFile, adPersistXML
  If .State = adStateOpen Then .Close
End With
End Sub


Download this snippet    Add to My Saved Code

Saving information to an XML file format Comments

No comments have been posted about Saving information to an XML file format. Why not be the first to post a comment about Saving information to an XML file format.

Post your comment

Subject:
Message:
0/1000 characters