textcopy via cmd verse in c++ with CreateProcess or WinExec

textcopy via cmd verse in c++ with CreateProcess or WinExec

Post by chri » Sat, 05 Jan 2002 02:39:31



I run the following command in dos and it works fine

C:\mssql7\binn\textcopy.exe /Slocalhost /Uusername /Ppassword
/Ddatabase /Ttable /Ccolumn /W"Where ID='198300' "
/F"C:\Temp\asdfasdf" /I

it works fine in dos then I added it to my c++ applike this

String command="C:\mssql7\binn\textcopy.exe /Slocalhost /Uusername
/Ppassword /Ddatabase /Ttable /Ccolumn /W"Where ID='198300' "
/F"C:\Temp\asdfasdf" /I";

CreateProcess( NULL, command, NULL,NULL,FALSE,0, NULL,NULL,&si,&pi )

The command executes and the sql profiler shows it runs, but No data
is stored when using the C++ version.
Permissions are fine on the dirs allowing all to read just not storing
the data.

the only difference I have found from a sql profiler is that the dos
command line returns this additional line

-- writetext bulk table.column 0xf6ff14c602000000e531000001004a00
timestamp = 0xf6ff14c602000000 with log

Anyone know what could be up? I really thought I had this working, I
can get the data to come out not problem in C++ , but not in?

 
 
 

1. textcopy via cmd verse in c++ WinExec or CreateProcess

I run the following command in dos and it works fine

C:\mssql7\binn\textcopy.exe /Slocalhost /Uusername /Ppassword
/Ddatabase /Ttable /Ccolumn /W"Where ID='198300' "
/F"C:\Temp\asdfasdf" /I

it works fine in dos then I added it to my c++ applike this

String command="C:\mssql7\binn\textcopy.exe /Slocalhost /Uusername
/Ppassword /Ddatabase /Ttable /Ccolumn /W"Where ID='198300' "
/F"C:\Temp\asdfasdf" /I";

CreateProcess( NULL, command, NULL,NULL,FALSE,0, NULL,NULL,&si,&pi )

The command executes and the sql profiler shows it runs, but No data
is stored when using the C++ version.
Permissions are fine on the dirs allowing all to read just not storing
the data.

the only difference I have found from a sql profiler is that the dos
command line returns this additional line

-- writetext bulk table.column 0xf6ff14c602000000e531000001004a00
timestamp = 0xf6ff14c602000000 with log

Anyone know what could be up? I really thought I had this working, I
can get the data to come out not problem in C++ , but not in?

2. Find keycode of installed sql server

3. textcopy.exe in c++ with CreateProcess

4. Oracle DBA OCP Tracks(Practice Questions)

5. Bounding Datalist with Rs via Open or Rs via cmd.execute

6. Get multiple result sets in VB

7. textcopy via cmdshell

8. Oracle sequences

9. oracle table fill from flatfile via .cmd/.ctl files using telnet

10. Disabling cmd-d (duplicate record) via resedit

11. set rs = cmd.Execute fails when cmd.CommandText includes spaces

12. C++, C++, C++, C++