princessk1
Programmer
I am calling a stored procedure from vb that fills a table with a small amount of information and then using the data in the table to create a text file. The beginning of the code looks like this:
Set fs = CreateObject("Scripting.FileSystemObject"
Set a = fs.CreateTextFile("c:\Export\imapdtl.tab", True)
cmd.ActiveConnection = conn
'call stored procedure that calculates sales total
cmd.CommandText = "usp_tempConsignmentSales"
cmd.CommandTimeout = 1000
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("startdate", adVarChar, adParamInput, 10)
cmd.Parameters("startdate".Value = DTStartDate
cmd.Parameters.Append cmd.CreateParameter("enddate", adVarChar, adParamInput, 10)
cmd.Parameters("enddate".Value = DTEndDate
cmd.Execute
cmd.Parameters.Refresh
I get an illegal error when using the executable.
Does anyone have any ideas as to why this would happen?
Set fs = CreateObject("Scripting.FileSystemObject"
Set a = fs.CreateTextFile("c:\Export\imapdtl.tab", True)
cmd.ActiveConnection = conn
'call stored procedure that calculates sales total
cmd.CommandText = "usp_tempConsignmentSales"
cmd.CommandTimeout = 1000
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("startdate", adVarChar, adParamInput, 10)
cmd.Parameters("startdate".Value = DTStartDate
cmd.Parameters.Append cmd.CreateParameter("enddate", adVarChar, adParamInput, 10)
cmd.Parameters("enddate".Value = DTEndDate
cmd.Execute
cmd.Parameters.Refresh
I get an illegal error when using the executable.
Does anyone have any ideas as to why this would happen?