Home » Articles posted by Manoj (Page 3)

Overload Webservice.

TO workout the error when we overload the [WebMethod] like the following you must change webservice code as follows However, we may also get errors if which is the auto generated while adding webservice in visual studio So we need to remove or comment the above line
Continue reading

Use Session Enabled Webservice in WindowsForm.

public class MyService : System.Web.Services.WebService { [WebMethod(EnableSession=true)] public void setMethod(bool value) { Session["myBoolVariable"] = value; } [WebMethod(EnableSession=true)] public bool getMethod() { return (bool)Session["myBoolVariable"]; } }   In above Webservice Session is used but in windows form application there is no any logic to use session so detect session...
Continue reading

StrorProcedure To Generate Data Provider Class From Table

************** Execute StoreProcedure **************** sp_CreateDataProviderFromTable 'Tablename', 'name' ************** StoreProcedure to store *************** CREATE proc [dbo].[sp_CreateDataProviderFromTable] ( @TableName NVARCHAR(50), @MethodName varchar(100) ) as DECLARE @ProtdVars VARCHAR(max),@PublicProps VARCHAR(max), @CMDProps VARCHAR(max), @InsertStmt VARCHAR(max), @UpdateStmt VARCHAR(max) DECLARE @PublicProps2 VARCHAR(max), @CMDProps2 VARCHAR(max),@CMDProps3 VARCHAR(max) , @PublicProps3 VARCHAR(max), @DRProps Varchar(max), @DRProps4 varchar(max), @DRProps2 varchar(max),@DRProps3 varchar(max)...
Continue reading

Store Procedure To Generate Class From Table

*********** Execute StoreProcedure ********************** sp_GenerateClassFromTable 'TableName' *********** StoreProcedure to store ********************* CREATE proc [dbo].[sp_GenerateClassFromTable] ( @TableName NVARCHAR(50) ) as DECLARE @ProtdVars NVARCHAR(max),@PublicProps NVARCHAR(max), @CMDProps NVARCHAR(max), @InsertStmt NVARCHAR(max), @UpdateStmt NVARCHAR(max) Declare @MyString nvarchar(max), @NewLineChar AS CHAR(2) SET @NewLineChar = Char(13) + CHAR(10) DECLARE @ColName NVARCHAR(20), @ColType NVARCHAR(10) DECLARE @Value...
Continue reading

Subscribe

Join 901 other subscribers