Wednesday, 3 April 2013

shrink database in sql server 2008

Step1:
ALTER DATABASE BASE SET RECOVERY SIMPLE
 --Execute this line.
Step2:
-- Find the log file of data base.
SELECT name
FROM sys.database_files
WHERE type_desc = 'LOG'


Step3:
DBCC SHRINKFILE ('FINANCE_log', 1000)

OR
 Go to object browser-> then select database and make right click->Select TASK->SHRINK->Files
shrink window will open.
Choose File Type as LOG from dropdown control. Then click OK

DO it your OWN RISK.


VB6 and Crystal Reports 8.5

1. We can display the column value in crystal reports 8.5 through SP. Suppose the column is in varchar type and size of 1000.  That column will not display in formula field to apply formula.

2. In VB application we can use Rich text box control. In this control user can type the enter key to break the line. When we display the content of rich text box value in crystal report the line will break as per enter key value. In this case we can use Replace string formula (which available in crystal report formula section) .
Find string is chr(10),chr(13)  these are enter key value and replace with "" (space).