Skip to main content

Posts

Showing posts from 2010

Deploying VS 2010 and Crystal Reports for VS 2010

for win App: download SAP Crystal Reports runtime engine for .NET Framework 4 (32-bit) SAP Crystal Reports runtime engine for .NET Framework 4 (64-bit) from here extract the package, u'll ended up with this 2 files CRRuntime_64bit_13_0.msi CRRuntime_32bit_13_0.msi copy both to: C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\Crystal Reports for .NET Framework 4.0\ in Setup Project Prerequisites, u must check SAP Crystal Reports Runtime Engine for .NET Framework 4.0 then build the Setup :D hope this help, see u

ClickOnce: "Value cannot be null.\r\nParameter name: activationContext"

heloo.. if u get "Value cannot be null.\r\nParameter name: activationContext" error when try to deploy clickone.. make sure Enable ClickOnce Security Setting leave uncheck.. see the image until then

Backup SQL Server DB to network drive

here the step that needed: 1. make sure SQL SERVER SERVICE in run under same account and password between SQL SERVER machine and Network Machine ex: Network Machine: \\192.168.1.5\f$ - share the f$ in 192.168.1.5 - set security for the share for : user1 with pwd: pwd1 SQL Server machine: - create user1 with pwd: pwd1 if it doesn't exist - setting the Service for SQL SERVER to run under: user1 account with pwd: pwd1(Log On As) - execute the script 2. backup script BACKUP DATABASE [DB_LIVE] TO DISK = '\\192.168.1.5\f$\backup_db.bak' WITH NOFORMAT, NOINIT, NAME = N'SRM_LIVE-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 u can set it to run for jobs too see u

Adding old VS 2008 Solution to TFS 2010

i'm using VS 2010 and try to adding old VS 2008 Solution to TFS 2010 (after i upgrade the Solution) always receive an error that said can't access TFS url :( what i've done: -uninstall TFS 2010 -uninstall Windows that host TFS 2010 -reinstall TeamExplorer 2008 SP1 working solution (no need step above :sad: ) create new empty Solution in VS 2010 then add existing project to it then check in been trying this for 1 week :(, glad finally works

Using Ranking Functions to Deduplicate Data

he introduction of ranking functions in SQL Server 2005 allowed the generation of listings with generated numbers based on sort orders providing keys such as row numbers and rank. These can be used for the deduplication of data in a simple way. Consider the following simple example of a list of characters: A A B B C D D E Let's put this into a table. This example creates a table variable. declare @AlphaList table (AlphaKey char); insert into @AlphaList(AlphaKey) values ('A'); insert into @AlphaList(AlphaKey) values ('A'); insert into @AlphaList(AlphaKey) values ('B'); insert into @AlphaList(AlphaKey) values ('B'); insert into @AlphaList(AlphaKey) values ('C'); insert into @AlphaList(AlphaKey) values ('D'); insert into @AlphaList(AlphaKey) values ('D'); insert into @AlphaList(AlphaKey) values ('E'); select AlphaKey from @AlphaList order by 1; If we now use the ROW_NUMBER function we can get a listing of @AlphaList table

Connect to SBO 8.8 via DIAPI

been trying to connect with simple step using DIAPI for SBO 8.8 got same issue: Connection to license server failed; if license server address is invalid, correct it; if TAO NT Naming Service stopped, activate it and restart License Manager after searching for 2 days, got the solution 1. Please check if the ports 30000 and 30001 is not blocking 2. Check if have any kind of anti-virus run 3. Please remove and re-install the server tools again. 4a. Go to the folder 'C:\Program Files\SAP\SAP Business One\ServerTools\License' (check in the security properties, if the current user has Full Controller to the folder (Right click > Security > Permissions) b. In the folder 'C:\Program Files\SAP\SAP Business One\ServerTools\License' check the file "NT_Naming_Service.exe", Right click > Security > Permissions > and check if you have full control in this file. 5. Please check if the SQL services and SBO Licenses Server is running automatically Please also t

VB.NET and C# Comparisons

VB.NET Program Structure C# Imports System Namespace Hello Class HelloWorld Overloads Shared Sub Main (ByVal args() As String) Dim name As String = "VB.NET" 'See if an argument was passed from the command line If args.Length = 1 Then name = args(0) Console.WriteLine("Hello, " & name & "!") End Sub End Class End Namespace using System; namespace Hello { public class HelloWorld { public static void Main (string[] args) { string name = "C#"; // See if an argument was passed from the command line if (args.Length == 1) name = args[0]; Console.WriteLine("Hello, " + name + "!"); } } } VB.NET Comments C# ' Single line only REM Single line only ''' XML comments // Single line /* Multiple line */ /// XML comments on single line /** XML comments on multiple lines */ VB.NET Data Types C# Value Types Boolean Byte, SByte

How to display an assembly in the "Add Reference" dialog box

When you are developing a class library, you may want Visual Studio .NET to list your library in the Add Reference dialog box on the .NET tab without the user having to browse for it. This issue is not resolved if you install your assembly to the global assembly cache, because the Add Reference dialog box is path-based and does not enumerate the components from the global assembly cache. To display your assembly in the Add Reference dialog box, you can add a registry key, such as the following, which points to the location of the assembly [HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\ MyAssemblies ]@="C:\\ MyAssemblies " where MyAssemblies is the name of the folder in which the assemblies reside. NOTE : You can create the this registry entry under the HKEY_LOCAL_MACHINE hive. This will change the setting for all of the users on the system. If you create this registry entry under HKEY_CURRENT_USER , this entry will affect the setting for only the cur

Put Decimal Value in Total query

if ur query return like this 123456789 and u want to put decimal to it try this query SELECT CONVERT(VARCHAR(100),CONVERT(MONEY, 123456789), 1) from BOL The following table shows the values for style that can be used for converting money or smallmoney to character data. Value Output 0 (default) No commas every three digits to the left of the decimal point, and two digits to the right of the decimal point; for example, 4235.98. 1 Commas every three digits to the left of the decimal point, and two digits to the right of the decimal point; for example, 3,510.92. 2 No commas every three digits to the left of the decimal point, and four digits to the right of the decimal point; for example, 4235.9819. hope this help see u

Using Half Size Form in Crystal Reports

i have a hard time trying to solve this one scenario: at first, we using Letter format to print Delivery Order and Invoice..it run smoothly and in CR we just using Letter as the Page Setup.. now new paper format is coming which is half of the Letter size at first i thougt it is easy because we only need to create new paper size on Server Properties under Printer and Faxes then use the new size at Paper Size in CR then redesign it to fit but it all when wrong, eventhough it display correctly but when i want to print it, it turn up everything that vertical become horizontal..very2 strange behaviour so i give using CR.PrintReport method..i ended up format it to .rtf then print it using this code Dim oDoc As New ReportDocument Dim sFileName As String = String.Empty oDoc.Load(_ReportPath) 'must use this line to make sure it print using the new size 'credit goes to Ali from dotnet.netindonesia.net Dim printDoc As System.Drawing.Printing.PrintDocument = New System.Dra

Resolve Collation error in SQL Server

i often get this error when trying to JOIN some table Cannot resolve the collation conflict between "SQL_Latin1_General_CP850_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. u need to use COLLATION when performing the JOIN, something like this SELECT field1 FROM table1 INNER JOIN table2 ON table1.field3 COLLATE DATABASE_DEFAULT = table2.field4 COLLATE DATABASE_DEFAULT i found this when trying to JOIN, maybe it affect other areas..until i found one see u

Find for SQL Objects, Entities or Text

IF EXISTS (SELECT * FROM Sys.Objects WHERE object_id = OBJECT_ID(N'[dbo].[uspFindObjects]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[uspFindObjects] GO CREATE PROCEDURE uspFindObjects @ObjectType CHAR(2)=NULL, @SearchText VARCHAR(500) = NULL, @SearchType CHAR(1)=NULL, @OrderBy CHAR(1)='N' AS BEGIN /*********************************************************************************************************** Procedure: uspFindObjects Parameters: 1. @ObjectType - Type of object to be searched. - U : Table - P : Stored Procedure - V : View - FN : Function - * : Find All (Tables, SP, Views, Functions) 2. @SearchText - Text to be searched 3. @SearchType - Type of data to be searched - N : Name - C : Column - T : Text 4. @O

How to search all columns of all tables in a database for a keyword

usage: EXEC SearchAllTables 'Computer' CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS BEGIN -- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved. -- Purpose: To search all columns of all tables for a given search string -- Written by: Narayana Vyas Kondreddi -- Site: http://vyaskn.tripod.com -- Tested on: SQL Server 7.0 and SQL Server 2000 -- Date modified: 28th July 2002 22:50 GMT DECLARE @Results TABLE (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) SET NOCOUNT ON DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110) SET @TableName = '' SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''') WHILE @TableName IS NOT NULL BEGIN SET @ColumnName = '' SET @TableName = ( SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND QUOTENAME(TABLE_

Showing Hidden Device

if u wonder why u have so many network adapters that don't listed in Windows' Device Manager then here is a cure for you :D type this in command prompt set devmgr_show_nonpresent_devices=1 then u will see the hidden devices after that u simply expand the network adapter nodes and it will show the hidden devices see u :D