trpnbillie
Programmer
Does anyone know if it's possible to export data into a tab delimited file from a PASS-THROUGH query?
I am able to use the following, but not with the results i want:
1) DoCmd.TransferText - I can only use with a table or regular select query. If I try my PASS-THROUGH query, it fails.
2) DoCmd.OutputTo - exports the data from my PASS-THROUGH query but in a pipe delimited format (i cannot get it to be tab-delimited, no text qualifying text file)
My code =
--------
Private Sub Command33_Click()
Dim strSQLForSP As String
Dim ID1 As String
Dim ID2 As String
ID1 = Form_Form1.cbox_iID1
ID2 = Form_Form1.cbox_iID2
strSQLForSP = "mySQLSproc " & ID1 & " , " & ID2
CreatePassThroughQuery strSQLForSP, "ReportQuery", False, True
DoCmd.TransferText acExportDelim, MySpec, "ReportQuery", "C:\Test.txt"
End Sub
--------------
Is it not possible to do this or is there another way? Essentially, I want the results from my pass-through query into an external text file.
Notes - my PASS-THROUGH query executes a SQL stored procedure. If i could create a select query AFTER my pass-through query is executed, I would, but I don't know how since it is created dynamically....
Thanks for any help!!!
I am able to use the following, but not with the results i want:
1) DoCmd.TransferText - I can only use with a table or regular select query. If I try my PASS-THROUGH query, it fails.
2) DoCmd.OutputTo - exports the data from my PASS-THROUGH query but in a pipe delimited format (i cannot get it to be tab-delimited, no text qualifying text file)
My code =
--------
Private Sub Command33_Click()
Dim strSQLForSP As String
Dim ID1 As String
Dim ID2 As String
ID1 = Form_Form1.cbox_iID1
ID2 = Form_Form1.cbox_iID2
strSQLForSP = "mySQLSproc " & ID1 & " , " & ID2
CreatePassThroughQuery strSQLForSP, "ReportQuery", False, True
DoCmd.TransferText acExportDelim, MySpec, "ReportQuery", "C:\Test.txt"
End Sub
--------------
Is it not possible to do this or is there another way? Essentially, I want the results from my pass-through query into an external text file.
Notes - my PASS-THROUGH query executes a SQL stored procedure. If i could create a select query AFTER my pass-through query is executed, I would, but I don't know how since it is created dynamically....
Thanks for any help!!!