|
-
November 17th, 2007, 05:54 AM
#1
How to create text files and xml files from vb
Hello friends,
I have two doubts.
1.How to create xml file and text files using vb codes?
2.Is it possible to create xml file direcly from sql server for data sending?.How?
Thanks in advance,
Santhosh
-
November 17th, 2007, 11:52 AM
#2
Re: How to create text files and xml files from vb
Download the MSXMLx parser. Think they're up to version 6
SQL Server 2005 might be able to send xml
-
November 19th, 2007, 09:22 AM
#3
Re: Want to create XML file directly from SQL
Can you be a bit more specific in what you want?
What kind of Database? What kind of XML file? How do you want it to be generated/used?
On Error Kill(User)
-
November 19th, 2007, 10:37 AM
#4
Re: Want to create XML file directly from SQL
 Originally Posted by santhoshabraham
Hello Friends,
I Want to create XML file directly from SQL...pls give me some tips for that
regards,
Santhosh
Lookup For "For XML" keyword in books online.
-
November 20th, 2007, 03:18 PM
#5
Re: How to create text files and xml files from vb
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
November 21st, 2007, 04:07 PM
#6
Re: How to create text files and xml files from vb
Call the function below like this. . . pass it a recordset and it will create an xml file from of the recordset you pass to it. It also returns the recordset completely detached from its datasource.
Set rsRecordSet = DisconnectRecordSet(rsRecordSet)
Code:
Public Function DisconnectRecordSet(rsRecordSetToDisconnect As ADODB.Recordset) As ADODB.Recordset
Dim sPersistedRecordsetFileName As String
On Error GoTo DisconnectRecordSetErrHandler
sPersistedRecordsetFileName = App.Path & "\" & App.EXEName & ".xml"
' wipmove.xml"
If LenB(Dir(sPersistedRecordsetFileName)) <> 0 Then
Kill sPersistedRecordsetFileName
End If
rsRecordSetToDisconnect.Save sPersistedRecordsetFileName, adPersistXML
rsRecordSetToDisconnect.Close
Set rsRecordSetToDisconnect = Nothing
Set rsRecordSetToDisconnect = New ADODB.Recordset
rsRecordSetToDisconnect.CursorLocation = adUseClient
rsRecordSetToDisconnect.LockType = adLockBatchOptimistic
rsRecordSetToDisconnect.Open sPersistedRecordsetFileName
Set DisconnectRecordSet = rsRecordSetToDisconnect
DisconnectRecordSetExitPoint:
On Error Resume Next
Exit Function
DisconnectRecordSetErrHandler:
Select Case Err.Number
Case Else
MsgBox AN_UNEXPECTED_ERROR_OCCURRED_IN & "Globals.DisconnectRecordSet" & vbCrLf & vbCrLf & Err.Description, vbOKOnly + vbExclamation
End Select
Resume DisconnectRecordSetExitPoint
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|