Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-08-31 : 09:35:13
|
| yew fung writes "I am calling a stored procedure using Visual Basic, and the stored procedure generates text files (*.txt) as the output. I am using the xp_cmdshell extended procedure to perform that task.Something like this:SET @v_CMD = '@ECHO 'SET @v_CMD = @v_CMD + CONVERT(VARCHAR(20),@FILING_NUMBER) SET @v_CMD = @v_CMD + CONVERT(VARCHAR(30),@FILING_DATE)SET @v_CMD = @v_CMD + ' >> ' + @FILE_NAMEEXEC master..xp_cmdshell @v_CMDThe problem happens when i run the stored procedure through Visual Basic. The output file seems to be truncated, with top half of the file missing.I then run the stored procedure using Query Analyzer and the output file is perfect, with a complete top half.What seems to be the problem? Something wrong with the calling stored procedure through Visual Basic? Or is the output file through Visual Basic exceeding a certain size limit? If so, how do i increase the size?thanxyewfung" |
|
|
|
|
|