February 29, 2012

Speed Up File Copy in Windows 7

1- Disable Auto-tuning
Command: netsh interface tcp set global autotuninglevel=disabled

2- Remove RDC
Control Panels > Programs and Features > Turn Windows features on or off > Unchecked Remote Differential Compression

3- Remove IPv6
Control Panel > Network and Sharing Center > Change adaptor settings > Right click on your enabled network >  Properties > Uncheked Internet Protocol Version 6 (TCP/IPv6)

4- Clear DNS Cache
Command: ipconfig /flushdns

February 28, 2012

Print DOS Application With Windows Printer

Problem
- How can i print with laser and inkjet printers with MS-DOS Application
- How to print with old DOS programs

Solution A
The DOSPRN can help you ;-)
Site: www.dosprn.com
FAQ: www.dosprn.com/faq.htm

Solution B
Download the PRN2FILE and run it in DOS mode. This resident DOS application converts the print task to PRN file.
You can use of below command for save print task in 1.PRN.
Command: prn2file.com C:\1.PRN
For start automatically in each start command in windows you can append the above command in end of %windir%\system32\autoexec.nt file.
Site: cejvik.xf.cz/prilohy/dos_usb_print_prn/
Link ver1.0: cejvik.xf.cz/prilohy/dos_usb_print_prn/prn2file.zip
Link ver1.0: http://www.4shared.com/rar/j2SARDvj/20120228-prn2file.html
Link ver1.1 (+modification):  ftp://ftp.simtel.net/pub/simtelnet/msdos/printer/prn2fil3.zip
Link ver1.1 (+modification):  http://www.4shared.com/zip/r9vT8VwT/20120303-prn2file11.html

Usage (v1.0): PRN2FILE [path][filename][/Pn][/Bnn][/F][/A][/U]
Run PRN2FILE with the desired filename to activate it.
Run it with a different filename to change destination file.
/P to designate the printer number (defaults to 1)
/B to enter buffer size in K bytes (defaults to 4)
/F to print just to file and not to printer (default is both) [in v1.1 only]
/A to append to file (default is to create new file) [in v1.1 only]
/U to uninstall the program

February 22, 2012

Connection is busy with results for another hstmt

Problem
- What's this ERROR [HY000] [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
- I have problem with OdbcCommand in C# ...
- The {System.Data.Odbc.OdbcErrorCollection} error comes after ExecuteReader


Solution A
Add a  SET NOCOUNT ON in first line of CommandText of your Command

Solution B
Change ExecuteReader() to ExecuteNonQuery() or ExecuteScalar()