May 27, 2002 #1 herci Programmer Nov 8, 2002 23 PA Hi I´am kind of new using VB6 How can I create and populate a .txt file using a recordset with an ADODB? I will apreciate any kind of help.. thank
Hi I´am kind of new using VB6 How can I create and populate a .txt file using a recordset with an ADODB? I will apreciate any kind of help.. thank
May 27, 2002 #2 elziko Programmer Nov 7, 2000 486 GB Try persiting to XML... which can easily be changed to any text format file: Dim objCon As ADODB.Connection Dim objRec As ADODB.Recordset Set objCon = New ADODB.Connection Set objRec = New ADODB.Recordset objCon.Open YOURCONNECTIONSTRING objRec.Open "SELECT * FROM yourtable", objCon objRec.Save "c:\yourxml.xml", adPersistXML objRec.Close Set objRec = Nothing objCon.Close Set objCon = Nothing Upvote 0 Downvote
Try persiting to XML... which can easily be changed to any text format file: Dim objCon As ADODB.Connection Dim objRec As ADODB.Recordset Set objCon = New ADODB.Connection Set objRec = New ADODB.Recordset objCon.Open YOURCONNECTIONSTRING objRec.Open "SELECT * FROM yourtable", objCon objRec.Save "c:\yourxml.xml", adPersistXML objRec.Close Set objRec = Nothing objCon.Close Set objCon = Nothing