text file not created while running a batch file through access

Joined
Apr 9, 2007
Messages
1
Reaction score
0
Hi friends,

I am running a batch file which runs an sql script and spools the output to a text file.when running this batch file by clicking directly i am getting the output .but when run through Access i am not getting output.

the code used for running batch file is

Sub MCS_Processing()

Const sQRY_TBL_MCS_SUBCON As String = "qry_Tbl_SUBCON_Insert"
'DoCmd.OpenQuery (sQRY_TBL_MCS_SUBCON)
'DoCmd.Close acQuery, sQRY_TBL_MCS_SUBCON

Dim rs1 As DAO.Recordset
Set rs1 = CurrentDb.OpenRecordset("SELECT distinct full_name,irs_tax_id,cap_model_id,line_of_business FROM tbl_Subcon " & _
"ORDER BY cap_model_id,line_of_business ")
While rs1.EOF = False
Call Shell("N:\SSBIT\Sujith\capitation_change_request\capitation_change_request\Script\NVCAP_SUBCON.bat " & Chr(34) & rs1(0) & Chr(34) & " " & rs1(1) & " " & rs1(2) & " " & rs1(3), vbMinimizedNoFocus)
rs1.MoveNext
Wend


End Sub

the batch file contains :

`echo -------------------------------------------------------------------
echo 1. executing nevada caproster..
Echo Start Time: %time%
sqlplus
(e-mail address removed) @N:\SSBIT\Sujith\capitation_change_request\capitation_change_request\Script\NV_CAP_CODE_new2_SUBCON.sql %1 %2 %3 %4
echo End Time: %time%


while running through access the batch file is running but i am not getting the output.usualy when i run the batch file directly the output is generated in the same folder itself.

Anybody having solution to this please share it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top