Wednesday 30 July 2008

VSS get from label using a BAT file

It is recommended that you if you want to retrieve files from a label in VSS you always get it from command line using the SS GET command. When done in this way it will always get the correct version in case there was a label move operation on a particular file.

For example:

echo off
cls
c:
cd "C:\Program Files\VSS\win32\"
set SSUSER=username
set SSDIR=\\blah\Data\Applications\SourceSafe\Development\
ss Get $/Blah/Development/Code/dh/*.* -R -VL"LabelName" -GF -I-Y
if %errorlevel% equ 100 goto error
if %errorlevel% equ 0 goto end
:error
echo %errorlevel% Source Safe Error
:end
echo Finished
pause

Version not found? Read here: http://support.microsoft.com/kb/197050

Monday 7 July 2008

Wednesday 2 July 2008

How to format code in your blog beautifully!

Fantastic tip: Click here for the original article

How to run an exe from a vbs?

If you want to call an EXE from within your VBS code you can make use of Windows Script Host (WSH). Click here for an article on WSH.

Below is an example of creating a shell object to call the EXE:

Set wshShell = CreateObject("Wscript.Shell")
Int returnCode =
wshShell.Run("C:\MyProgram.exe", 0, true)

Tuesday 1 July 2008

Connect to SQL*Plus from command line

To start SQL*Plus from the command line you need to get into the root directory first i.e. C:\.

Now type:

sqlplus {user_id}/{password}@{database}

For example:

sqlplus mailto:SHANEM/SHANEMC@GRPDEVA_SRV or
sqlplus SHANEM/SHANEM@GRPDEVA_SRV @001.sql

How do I execute a SQL file using SQL*Plus?

To execute a *.sql file using Oracles' SQL*Plus command utility you must follow these steps:
  • Start SQL*Plus
  • Type in connection information and connect
  • At the prompt type @{file} for example:
  • @MyFile.sql or
  • @oracle/scripts/MyFile.sql

Reference Link: http://www.techonthenet.com/oracle/questions/script.php