This exception is thrown only in 3 cases: 1. Parameter is not passed to sub report 2. Parameter which is been passed is not been created on sub report 3. Data type of parameter on main report and sub report is not matching up. To download code and project, please check link below:
Views: 7617 techsapphire
Steps to download: 1. Navigate to video page 2. Right click select inspect 3. Go to networks tab 4. Clear network logs before playing video 5. Play video 6. Find link with video extension like mp4, mkv, etc
Views: 12290 techsapphire
SQL Server 2017 support Python service. Which allows you to use python script from SQL queries. Python is great in data processing. In this lecture we have used Python Pandas library to process data frame and to generate cross tab output. Cross tab or matrix in SQL server are difficult to generate as no direct function is available.
Views: 4894 techsapphire
With architecture discussed in this lecture. You will be able to print POS receipt directly from all browser. Flow for architecture is: 1. Browser 2. Protocol 3. Job Handler Communication flow is: 1. Browser 2. Job Handler 3. POS Printer Job handler is normal console application without UI "user interface" whose main job is to take request from browser & use requested orderid to pull report from website and transfer report to printer. I provide architectural solution Feel free to contact for commercial solutions.
Views: 28090 techsapphire
ESC/POS receipt report using C# including barcode, logo image and QR code. In video package used is PrinterUtility. In example receipt report contain logo, barcode, alignment, charsize, QR code, Font and Separator. (slow printing POS receipt solved) Note: Watch video on 480 or 720 DPI
Views: 29502 techsapphire
This tutorial will help you to build responsive design on windows application using windows forms. Control used: Flow Layout Panel Table Layout Panel Split Contaner Property used: Dock To download sample project click on link below: http://www.techsapphire.in/index/responsive_design_in_windows_form_application/0-151
Views: 54911 techsapphire
In above lecture new SQL Server 2012 - SQL Server 2016 TSQL features are covered. Eg: 1. Running total using SUM and OVER operator 2. Lead and Lag 3. First_Value and Last_Value 4. OFFSET and FETCH 5. IIF 6. Choose 7. Dense Tank 8. Interview Questions 9. Query optimization or Performance tuning Link for script and backup file: http://www.techsapphire.in/index/sql_complex_queries_query_optimization_and_interview_questions_sql_server_2016/0-190
Views: 39015 techsapphire
Issue is caused because of NOINIT option. But this can be used as proper backup way to keep different version of databackup. Script used BACKUP DATABASE SampleDB TO DISK = 'D:\BackupFolder\Sample.bak' WITH NOINIT, NAME = N'SAMPLEDB' RESTORE HEADERONLY FROM DISK = 'D:\BackupFolder\Sample.bak' Video to restore backup on previous data version Video link :https://youtu.be/7HuyQhQlwZk
Views: 3059 techsapphire
In WPF we don't have keypress event, generally people used keypress event in windows forms application to validate text input. Now in this example I have showed how you can validate input from textbox using PreviewTextInput event. In this example I validated input to accept float values, you can use this to validate integer or any other number type validation. For code follow link below: http://www.techsapphire.in/news/keypress_event_in_wpf_to_validate_integer_input_is_replaced_by_previewtextinput_in_c/2016-03-06-67
Views: 7167 techsapphire
Fix for NetFx3 error while installing SQL Server 2012 on windows 8 Pro and SQL Server 2008 setup Error Microsoft .NET 3.5 installation has failed Step: 1. Open CMD in administrator mode 2. Copy below command and replace path at end of command with path of windows setup on your machine. dism /online /enable-feature /featurename:NetFx3 /source:"J:\Window\sources\sxs" dism /online /enable-feature /featurename:NetFx3 /source:"--Your window setup path--"
Views: 27695 techsapphire
Exporting complete SQL server database to CSV files. CSV cannot keep data for multiple worksheet as like excel files. So data for each table will be generated in separate files. SQL components used in this lecture are: • BCP (Bluck copy program) • xp_cmdshell • STUFF • FOR XML PATH Script used in video is available on link below: http://www.techsapphire.in/index/export_complete_sql_server_database_to_csv/0-181
Views: 2941 techsapphire
In this lecture, you will learn to do basic CRUD (Insert, Delete, Update and Select) operation using web service and stored procedure. To complete this lecture you need database script, web service and website to test. To download code and script follow link below: http://www.techsapphire.in/index/insert_delete_update_select_using_web_service_and_stored_procedure_in_asp_net/0-156
Views: 60554 techsapphire
This issue is very common and commonly faced by DBA, developers and server management team on production server i.e. SQL server leads into 100% CPU usage and also start consuming all available memory. Now most of the time you have seen technical people restarting sql services, or killing long running processes and even restarting complete server, and they can avoid this situation. Before starting any thing I would like to discuss a common myth people have that this is happening because of long running queries only. Which is not all ways true, some times: Longer running query can be problem Query having maximum worker time are also problem Query execution count can also cause problem For script check below link: http://www.techsapphire.in/index/sql_server_100_cpu_usage_fix/0-166
Views: 92999 techsapphire
Why OPOS for .NET ? POS for .NET is Microsoft framework provides great support for customization POS receipt. Why OPOS for .NET ? 1. Generic raw text print don't provide customization. 2. Cannot utilize full space on page. 3. Formatting is difficult (like rotation, alignment, sizing, etc). 4. Text Barcode. 5. Intellisense for building reciept. 6. Easy multilingual output.
Views: 1398 techsapphire
This problem comes when database is restored with "RESTORE WITH NORECOVERY" state or some times even sql services restart cause this trouble. So to fix this you just need to use below script to change recovery state to RECOVERY. RESTORE DATABASE YourDatabaseName WITH RECOVERY
Views: 46117 techsapphire
In this tutorial I have used SharpSSH for downloading, uploading and deleting file from remote SFTP.. To download script or code used please check link below: http://www.techsapphire.in/news/sftp_download_upload_and_delete_file_using_sharpssh_library/2014-08-02-51
Views: 19236 techsapphire
This lecture shows you way to update existing traditional hierarchy structure into HierarchyID structure. Hierarchy ID is nothing other then column which represent relational value in numeric format on which DFS (Depth First Search) & BFS (Breadth First Search) can be used The concept is very simple, when we have to make relational structures which shows parent child level tree hierarchy, we can use hierarchyid datatype. With hierarchy ID recursive queries can be converted into range query. DFS (Depth First Search) and BFS (Breadth First Search) can be implemented using additional index which improves performance. Uses .NET assembly library defined methods to provide easy maintenance. Hierarchy ID is scalar column and is sequence of no. of var binary values.
Views: 1825 techsapphire
In this video general concept of getting parent child records and also hierarchy bread crumb generation is done also along with this exceptions which generally comes while making recursive CTE are also discussed and showed how to solve them. To get script of table as well as queries please check link below: http://www.techsapphire.in/index/grandparent_parent_and_child_hierarchy_sql_server_or_bread_crumb/0-170
Views: 17739 techsapphire
To analyse SQL Server performance at given time. SQL Server standard reports provide quick peek, but still to get complete over view we have to traverse through different reports sequentially. Also for DBA who are new to performance tuning it’s difficult to make sense of different reports all together. Solution: SQL performance dashboard report provide you great and quick in site on things happening in or to SQL Server also information makes much more sense as it is provided with proper formatting. http://www.techsapphire.in/index/quick_performance_analysis_sql_server/0-188
Views: 2823 techsapphire
Generating matrix in SQL is bit tricky, in above lecture you will learn to generate matrix using CUBE and PIVOT, also difference between CUBE and ROLLUP. For downloading script follow link below: http://www.techsapphire.in/index/generating_matrix_using_sql_queries_using_cube_pivot_and_rollup/0-174
Views: 4953 techsapphire
Apply, TApply, LApply, Vapply, Ftable, xtab and aggregate functions are very important for data transformation. These are basic data processing functions. Script used in above lecture is mentioned on link below http://www.techsapphire.in/index/complete_apply_tapply_lapply_vapply_ftable_xtab_and_aggregate_function_in_r/0-183
Views: 3039 techsapphire
Solution for fixing this issue is: Add below script in beginning of your SP. IF 1=0 BEGIN SET FMTONLY OFF END FMTONLY returns only metadata to the dataset. Can be used to test the format of the response without actually running the query. Example SET FMTONLY ON; GO SELECT * FROM Orders; GO SET FMTONLY OFF; GO Above query will give column output without data.
Views: 1894 techsapphire
Query for passing dynamic path in OPENROWSET --Reading xml file using OPENROWSET from dynamic path DECLARE @Path VARCHAR(100)='C:\xml\Sample.xml' DECLARE @SQL VARCHAR(100)='SELECT cast(BulkColumn AS xml) FROM OPENROWSET( BULK ' + CHAR(39) + @Path + CHAR(39) + ', SINGLE_BLOB) AS x' EXEC(@SQL) Link for script http://www.techsapphire.in/index/dynamic_path_in_openrowset_with_output_variable/0-185
Views: 1590 techsapphire
Uploading and downloading file on SFTP using private key in .NET using SharpSSH Topic to cover: Connecting SFTP using Private Key using .NET console App • Downloading and Uploading File To download sample check article below: Article Link: http://www.techsapphire.in/index/uploading_and_downloading_file_on_sftp_using_private_key_in_net_using_sharpssh/0-162
Views: 8862 techsapphire
Control Array: When control of similar type share common event code then all of them together is known as control array. Example in video covers: How you can use common code by changing event name for each control with one even name and by casting sender in requested type at run time. We have seen how to make control array of Lisbox and Button. Similarly we can control array of any controls. Step 1 : Using same name of event for all controls of same type Step 2 : Casting sender in their base class reference object.
Views: 2083 techsapphire
Migrating database is always critical job for Database Administrators, usually which ends into bad performance of same database on newer version of SQL Server. Reason for this problem can be million but general reason is, it is because of growing data size. Tool Used: 1. Data Migration Assistant (DMA): Gives us early prediction about things which are going to break in newer SQL Server version. 2. Database Experimentation Assistant (DEA): Helps into performance testing (workload testing) before migration. What you need? 1. 3 Mock servers: a. 1st server will need to have existing production environment configuration. b. 2nd server will have configuration same as new production environment. c. 3rd server will replay the workload on both the servers. 2. Point in time backup of production database. 3. Capturing workload trace from production. 4. Processing captured workload for replay. Command:2 dreplay preprocess -m . -i "C:\Trace\Trace.trc" -d "C:\Trace\Preprocess" 5. Replaying workload on server 1st and 2nd from server 3rd. Command: dreplay replay -m yogeshmehla -d "C:\Trace\Preprocess" -o -s yogeshmehla -w yogeshmehlas 6. Capturing replay workload. 7. Creating DEA report. 8. Cleaning captured replay try by clear trace. 9. Creating general report from clean trace data.
Views: 1267 techsapphire
Value type and reference type seems to very small topic but it effect programming a lot. Value type are those whenever these are passed to any function then any change in value in calling function will never reflect into original source. Reference type are those whenever these are passed to any function then any change in value in calling function will reflect changes in original source. For value type datatypes you can implement reference call using ref and out keyword. Class objects are by default reference type so making copy of them is also doing using new object and assigning value to each property individually. For passing object reference ref or out keyword is not required as class objects are by default reference type. Difference between ref and out is: ref keyword can be used in un-managed code as it don't give guarantee of any change or assignment of value to reference object passed. But out keyword in other place guarantee assignment or change to passed reference objects. Note: you can not declare 2 methods with same name and having same type of parameters just making difference in key word used.
Views: 3328 techsapphire
With geography datatype you can create system where you can filter locations on bases of distance between them. Also it make very easy to calculate distance between 2 location points. Along with that you can use any GPS standard system using SRID parameter in methods offered by Geography datatype. For script check below link: Building system where you can search locations near by N miles or kilometer
Views: 20999 techsapphire
Access SQL Note: Northwind database used for example. 1. Pulling data from one table 2. Using alias 3. Pulling data from multiple tables using joins •Inner join/Equi Join •Left Join •Right join •Using IS NULL and IS NOT NULL operators 4. Date Queries 5. Different operators SELECT ID,COMPANY, [LAST NAME] + ", " + [FIRST NAME] AS [Contact Name] FROM CUSTOMERS SELECT ID AS [Company ID],COMPANY AS [Company Name], [LAST NAME] + ", " + [FIRST NAME] AS [Contact Name] FROM CUSTOMERS SELECT Customers.Company,Orders.[Order ID],Orders.[Ship Name],Orders.[Shipping Fee] FROM Customers INNER JOIN Orders ON Customers.ID = Orders.[Customer ID] ORDER BY Customers.Company SELECT customers.company,orders.* FROM Customers LEFT JOIN Orders ON Customers.ID = Orders.[Customer ID] WHERE Orders.[Order ID] IS NULL SELECT customers.company,orders.* FROM Orders RIGHT JOIN Customers ON Customers.ID = Orders.[Customer ID] WHERE Orders.[Order ID] IS NULL SELECT Customers.Company,Orders.[Order ID],Orders.[Ship Name],Orders.[Shipping Fee] FROM Customers INNER JOIN Orders ON Customers.ID = Orders.[Customer ID] WHERE Orders.[Order Date] =DATE() ORDER BY Customers.Company SELECT Customers.Company,Orders.[Order ID],Orders.[Ship Name],Orders.[Shipping Fee] FROM Customers INNER JOIN Orders ON Customers.ID = Orders.[Customer ID] WHERE Orders.[Order Date] BETWEEN DATEADD("m",-6,DATE()) AND DATE() ORDER BY Customers.Company SELECT Customers.Company,Orders.[Order ID],Orders.[Ship Name],Orders.[Shipping Fee] FROM Customers INNER JOIN Orders ON Customers.ID = Orders.[Customer ID] WHERE Orders.[Order Date] BETWEEN DATEADD("yyyy",-11,date()) and DATE() ORDER BY Customers.Company SELECT Customers.Company AS [Customer], Orders.[Order Date], Orders.[Shipped Date], Products.[Product Name], [Order Details].Quantity, [Order Details].[Unit Price], [Order Details].Discount FROM Products INNER JOIN ((Customers INNER JOIN Orders ON Customers.ID = Orders.[Customer ID]) INNER JOIN [Order Details] ON Orders.[Order ID] = [Order Details].[Order ID]) ON Products.ID = [Order Details].[Product ID]; [email protected]
Views: 13909 techsapphire
In this video I have covered example in which 3 tables are used: Agent_Master Scheme_Master Policy_Details For example: ASP.NET web forms and LINQ is used. Below is example of Insert delete update using webservices and ADO.NET https://youtu.be/O2epEAcdFDU Below is example of LINQ queries https://youtu.be/6i8G7gw5zKo
Views: 2294 techsapphire
Singleton Design Pattern • Comes under creational design pattern category. • No client can create instance of object from outside. • Only one instance of class is created and shared among all clients. Steps to implement singleton: • Define constructor with Private access modifier. • Define all methods and public properties as static.
Views: 2994 techsapphire
WCF (Window communication foundation) services are easy to build. Steps need to follow are: Step 1: Define Data contract (classes which you want to share among client for communication format) Step 2: Define Service Contract (Interface containing declaration of all methods exposed to client) and declaring method in service interface which you want to expose to client. Step 3: Implementing and defining methods in service class. Step 4: Adding reference to client project. Step 5: Making service client object. Step 6: You are ready to use now. Link for example covered: http://www.techsapphire.in/index/insert_delete_update_and_select_using_wcf_services/0-175
Views: 22546 techsapphire
Hierarchy ID is nothing other then column which represent relational value in numeric format on which DFS (Depth First Search) & BFS (Breadth First Search) can be used The concept is very simple, when we have to make relational structures which shows parent child level tree hierarchy, we can use hierarchyid datatype. With hierarchy ID recursive queries can be converted into range query. DFS (Depth First Search) and BFS (Breadth First Search) can be implemented using additional index which improves performance. Uses .NET assembly library defined methods to provide easy maintenance. Hierarchy ID is scalar column and is sequence of no. of var binary values. For script follow link below: http://www.techsapphire.in/index/learn_hierarchies_in_sql_server_using_hierarchyid/0-173
Views: 10040 techsapphire
With architecture discussed in this lecture. You will be able to print all documents directly from all browser. Flow for architecture is: 1. Browser 2. Protocol 3. Job Handler Communication flow is: 1. Browser 2. Web Job Handler 3. Printer Web job handler is normal console application without UI "user interface" whose main job is to take request from browser & download requested document and pass it to printer. I provide architectural solution Feel free to contact for commercial solutions. Name: Yogesh Mehla Website: www.techsapphire.in Email: [email protected] Phone: +91-9023262520 Skype: kingconspiracy
Views: 1588 techsapphire
What is Abstract Class ? • Abstract classes represent base classes of which you can not create object. These can only be inherited in order to use them. • No object of this class can be initiated. • Abstract class can have abstract and non abstract method. But abstract method can not be implemented in abstract class. Instead they need to be implemented in derived class. • Abstract method cannot be private • An abstract class cannot be static or sealed class. • Access modifier of abstract member should be same in derived class. If access modifier is public then in derived class method should be public. If it is protected then in derived class method should be protected. • Abstract method cannot be virtual as it is implicitly virtual. • Abstract member cannot be static. • Abstract class can inherit other class just like other normal class.
Views: 1868 techsapphire
To copy one list two another without using foreach loop: 1. Using Select extension method and forming new object at same spot. 2. Using parametrized constructor to achieve code re-usability.
Views: 2556 techsapphire
Mention your email in comments to receive code used in lecture. Mailmerge helps you to generate multiple output of similar format using dynamic data source. In this lecture we are using word (.docx) file for template and excel workbook (.xlsx) as input data source. I this lecture components used are: mailmerge module Required to merge .docx file with dynamic records and creating multiple copies of template page with different input values. Command: pip install mailmerge xlrd module Required to read excel(.xlsx) file. Command: pip install xlrd Merge fields Merge fields are used to indicate where the information from each record of your data source should be inserted. Limitation of this lecture are: Headings should not contain space or any special characters. All values should be formatted to text (date, number, etc.). Headings should be similar to merge fields.
Views: 2086 techsapphire
What is interface ? • An interface looks like a class but with no implementation. It only contains declaration of events, methods and/or properties. The reason interfaces only provide declaration is because they are inherited by classes and structs, for which it is mandatory to implement each interface member defined. • Interface act as digital signature of class. Why do we use interface ? • Enforcing standardization of vocabulary • Decoupling Advantages: • Decoupling of concrete classes from end implementation. • Standardization of vocabulary. • Runtime Polymorphism can be achieved. Difference between interface and abstract classes • An abstract class can have abstract members which are override by its derived class, also it can have non abstract members which can have their implementation in abstract class. But in case of interface all members are implicitly abstract and all members are override by its derived class. • The members of interface are all public with no implementation, no access modifier can be assigned to any member. Abstract class can have public or protected abstract members and can also have non abstract members static, public, protected or private too. • Abstract classes can add more functionality without destroying the child classes that were using the old version. In an interface creation of addition functions will have an effect on its child classes, as all interface members are mandatory to be implemented by derived classes. • But, defining an abstract class with abstract members has the same effect to defining an interface.
Views: 5008 techsapphire
This lecture explains architecture to implement single process handling arguments at run time. To implement this webAPI is used to accept runtime parameters. WebAPI is self hosted. Please leave your email in comment to receive source code.
Views: 573 techsapphire
Code snippets are meant as small region of reusable code. Which allow you to use intellisense to insert set of code N number of times. Below are the content you will cover in lecture. Using code snippets can save a lot of time and effort. Also help in distributing common standard code among team. • Code Snippets – Introduction • Ways to insert code snippets • Custom Code Snippets • XML File walkthrough • Examples • Using the custom snippets • Ready made code fragments • Two types • Expansion code snippet • Surround with code snippet Custom code snippets: • Steps to create custom code snippet • Create an XML file with extension .snippet • Import the snippets in Visual Studio • XML File boilerplate To download xml used in example, follow link below: http://www.techsapphire.in/index/code_snippets_and_steps_to_create_custom_code_snippets/0-182
Views: 1886 techsapphire
What is Polymorphism ? Poly means “many”, morphism means “forms”. It is ability of object or method to take different forms as per requirement. Type: • Compile time (Static): Method to be called is decided at compile time only. Method overloading is example of compile time polymorphism. • Runtime (Dynamic): Call to overridden function is decided at runtime. This is achieved using inheritance and overriding.
Views: 5040 techsapphire
Script used in this videos are mentioned below: BACKUP DATABASE SampleDB TO DISK = 'D:\BackupFolder\DBBackup.bak' WITH NOINIT, NAME = N'Sample DB - FULL Backup' RESTORE HEADERONLY FROM DISK = 'D:\BackupFolder\DBBackup.bak' RESTORE DATABASE SampleDB FROM DISK = 'D:\BackupFolder\DBBackup.bak' WITH REPLACE, FILE=2
Views: 11083 techsapphire
SQL Complex Queries, Sql Interview Question, SQL Server Queries,Queries In this lecture i have tried to cover all important topics which are required to construct complex queries. And queries in this lecture are often found as part of interview test. So try to understand them carefully. Can download script file from http://www.techsapphire.in/index/complex_interview_sql_quries_question/0-140 Watch this video on minimum 780Quality. This is high definition so it get degraded at low resolution. Learn creating complex queries https://www.youtube.com/watch?v=Fypof-gD_BE
Views: 118440 techsapphire