Click here to Skip to main content
Page 1 of 29
Page Size: 10 · 25 · 50


Author filtered by: Maciej Los [x]
Answer 14 May 2013   license: CPOL
I would suggest you to start here: ADO.NET[^]There you'll find code examples for ADO.NET: http://msdn.microsoft.com/en-us/library/dw70f090.aspx[^]From CP Knowledge Base:Using ADO.NET for beginners[^]A Beginner's Tutorial for Understanding ADO.NET[^]
C#
Answer 14 May 2013   license: CPOL
Maciej Los - wrote:Based on which criteria?nandkishorre - wrote:Based on Name bind only name and idIt's not possible, because names are duplicated, but id's not! ID Name344B6794 Visal is not equal to 9DC012F7 VisalCA6B5B10 Raghu is not equal to FDC12AC1 Raghu9B439B6F...
Answer 14 May 2013   license: CPOL
Have a look here: Programmatically Complete PDF Form Fields using Visual Basic and the iTextSharp DLL[^]
VB
Answer 14 May 2013   license: CPOL
I prefer to use Common Table Expressions[^]:DECLARE @tdata TABLE (grp INT, val INT)DECLARE @dtmp TABLE (grp INT, val INT)INSERT INTO @tdata (grp, val)VALUES(301, 1)INSERT INTO @tdata (grp, val)VALUES(301, 2)INSERT INTO @tdata (grp, val)VALUES(301, 5)INSERT INTO @tdata (grp,...
Answer 14 May 2013   license: CPOL
[EDIT #1]OK, i understand now. You need to add 2 columns for each file:file1Col1 | file1Col2 | file2Col1 | file2Col2 | file3Col1 | file3Col2 ... fileNCol1 | fileNCol2 and load data into these columns.Steps to do (logic):1) create datatable object 2) in a loop -> add columns 3) in a...
C#
Answer 13 May 2013   license: CPOL
My favorite method is to use Common Table Expressions[^].Example:DECLARE @fullAddress NVARCHAR(255)SET @fullAddress = '140/3 abcd, narayana, delhi,pin code-201101';With AddressParts AS( SELECT 1 AS PartNumber, LTRIM(LEFT(@fullAddress, CHARINDEX(',',@fullAddress)-1)) AS Part,...
Answer 13 May 2013   license: CPOL
There are several ways to achieve that. The method you choose depends on your needs.Please, refer these:How to create a trial version of your app?[^]http://stackoverflow.com/questions/4521468/where-to-store-the-protection-trial-info-for-software-protection-purpose[^]
C#
Answer 13 May 2013   license: CPOL
Have a look here: TRANSFORM Statement (Access)[^]Try this:TRANSFORM MAX(Faculty_Code)SELECT Sch_dateFROM Tb_SCh_TIme_Table where Course = 'CL2'GROUP BY Course PIVOT [Session]
C#
Answer 13 May 2013   license: CPOL
Please follow this link: http://khaledauf.blogspot.in/2010/08/configure-excel-services-with.html[^] and configure Excel services to work with Sharepoint.
C#
PIVOT Table in .NET by Maciej Los
Answer 13 May 2013   license: CPOL
Try this:IF NOT OBJECT_ID(N'#tmp') IS NULL DROP TABLE #tmpCREATE TABLE #tmp(Doc_Id INT, CL_Id INT, CL_Desc NVARCHAR(30), Rev_No INT, dwg_status_code NVARCHAR(30), EMP_Name NVARCHAR(30))INSERT INTO #tmp (Doc_Id, CL_Id, CL_Desc, Rev_No, dwg_status_code, EMP_Name)VALUES(146508, 15,...
Answer 13 May 2013   license: CPOL
See my past answers: How to restore table after delete[^]Rollback DROP TABLE command[^]database could not be restored[^]Undo update command in Sql Server[^]
Answer 13 May 2013   license: CPOL
I'm not sure that you need to rotate control (button)... In most cases is enough to rotate text on it. If i'm wrong, please, let me know.Please, refer this link: How to: Align Drawn Text[^]
Answer 13 May 2013   license: CPOL
Try this:DECLARE @tbl TABLE (myText NVARCHAR(30))INSERT INTO @tbl(myText)VALUES('Friday,May,05,2013');WITH cte AS( SELECT LEFT(myText, CHARINDEX(',', myText)-1) AS Word, RIGHT(myText, LEN(myText) - CHARINDEX(',', myText)) AS Remainder FROM @tbl WHERE CHARINDEX(',',...
Answer 13 May 2013   license: CPOL
It sounds like you're talking about Stemming[^]. Please, follow the links in above article.
How to make this work? by Maciej Los
Answer 12 May 2013   license: CPOL
Please, see this article: Building Dynamic SQL In a Stored Procedure[^]
Answer 12 May 2013   license: CPOL
Try this:SELECT DISTINCT *FROM Tmp Tmp inner JOIN MARKET_PLACE_DESIGN_RELATION MPDR ON MPDR.MARKET_PLACE_DESIGN=Tmp.MarketDesignhttp://www.w3schools.com/sql/sql_distinct.asp[^]
Answer 12 May 2013   license: CPOL
I would suggest you to read this: Best Coding Practices[^] and Program optimization[^], then read about Data Access Layer (DAL)[^].Resources:Creating a Data Access Layer[^]Implement a Data Access Layer for Your App with ADO.NET[^]Power Programming Tips for ASP.NET...
Answer 12 May 2013   license: CPOL
MS SQL Server:SET DATEFORMAT dmy;SELECT Enquiry.Enqid AS SLNO,Enquiry.Phone, Enquiry.mobile, Enquiry.custname,Enquiry.email,Enquiry.enqdate,Enquiry.enquirysource,Enquiry.workdescription from Enquirywhereenqdate
C#
Answer 12 May 2013   license: CPOL
Rather than string array, use List(of T)[^] generic class, which provide functionality for search, sort and manipulate list. Follow the link to find an example.
Answer 12 May 2013   license: CPOL
Try this:SELECT t2.*FROM Table1 AS t1 INEER JOIN Table2 AS t2 ON t1.Tab1ID = t2.Tab1IDWHERE t1.Condition = 'Jan'More about joins:http://www.w3schools.com/sql/sql_join.asp[^]Visual Representation of SQL Joins[^][EDIT #1]If those are datatables, use select on first datatable to...
Answer 12 May 2013   license: CPOL
Please, read the rules: Code Project Quick Answers FAQ[^] and then follow this link: Search for image and resource[^]Next time, please use Search Box before you ask a question, OK?
Answer 12 May 2013   license: CPOL
You need to define stored procedure[^].CREATE PROCEDURE GetNthUserByStatus @stat INT, @nth INTASBEGINSELECT idUser, nameUser, statusUserFROM ( SELECT idUser, nameUser, statusUser, ROW_NUMBER() OVER(ORDER BY idUser) AS RowNo FROM [Users] WHERE statusUser =...
check box value checked by Maciej Los
Answer 12 May 2013   license: CPOL
Please, read these articles:Convert.ToBoolean Method (Int32)[^]Convert.ToInt32 Method (Boolean)[^]
Answer 12 May 2013   license: CPOL
Did you google it?Please, have a look here: http://geekswithblogs.net/dotNETvinz/archive/2008/05/07/adding-multiple-columns-and-rows-in-gridview-without-using-a-again.aspx[^]
convert numbers to words by Maciej Los
Answer 12 May 2013   license: CPOL
Please, have a look here: Converting numbers to the word equivalent. [^] - converts numbers to words counting digits ;)
C#
Answer 11 May 2013   license: CPOL
It isn't so hard to do it.Please, see this: Weekday function (VB.NET)[^]Dim startdate As Date = New Date(2013, 5, 6)Dim enddate As Date = New Date(2013, 5, 12)Dim curdate As Date = startdateDo While curdate
Answer 11 May 2013   license: CPOL
Another way is to get all file names into DataTable[^] and than use CopyFromRecordset method[^] for MS Excel range. //get files into datatable string[] filePaths = Directory.GetFiles(@"F:\\Download\\", "*.txt",SearchOption.AllDirectories); DataTable dt =...
C#
Answer 10 May 2013   license: CPOL
Please, follow the below links:http://stackoverflow.com/questions/6409711/how-can-i-change-the-value-on-require-a-password-on-wakeup-to-false-programmat[^]When Windows Vista is running in audit mode for a long time, the computer is locked after the system resumes from standby or from...
Answer 10 May 2013   license: CPOL
Have a look at below example:using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { string sPattern =...
Answer 10 May 2013   license: CPOL
If i understand you well, you have hierarchical (tree) structure of data, so... all you need to do, is to use hierarchical alorithm(s)[^].Please, refer these CP articles:Tree Iterators[^] - this is what you are looking for!Hierarchical Tree Represented by Modified Preorder Tree Traversal...
C#
Answer 10 May 2013   license: CPOL
Try this:SELECT TOP (1) A.BADGENUMBER,A.EMPNAME,A.DESIG,B.PTIMEFROM TBL_EMP A INNER JOIN TBL_PUNCH B ON B.BADGENUMBER=A.BADGENUMBER AND B.SN=A.SN)WHERE A.SN='4550962200016'or this:SELECT DISTINCT A.BADGENUMBER,A.EMPNAME,A.DESIG,B.PTIMEFROM TBL_EMP A INNER JOIN TBL_PUNCH B ON...
Answer 10 May 2013   license: CPOL
I do not understand you... If you don't want to use formula, why are you asking about which is better: macro or formula? If you want to enumerate / list employees from the top of the second workbook/worksheet, because you don't want to sort data on formula column, you need to use VBA code...
Answer 10 May 2013   license: CPOL
There is no simple way to achieve that, because of lot of reasons, for example:1) route summary is stored as a text2) route points are duplicated (for example C).See below example (read comments)--declare master tableDECLARE @Ops_Route_Master TABLE (RouteId varchar(15),...
Answer 10 May 2013   license: CPOL
[EDIT #1]There is not possible to achieve that using pivot(s)[^], because aggregate function(s)[^] can be used only on numeric data.[EDIT]Try this:DECLARE @emp TABLE(EMPID INT, VehicalID NVARCHAR(30))INSERT INTO @emp (EMPID, VehicalID)VALUES(1, 'AB-1')INSERT INTO @emp (EMPID,...
Answer 10 May 2013   license: CPOL
Please, follow the links:How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic...
C#
Answer 10 May 2013   license: CPOL
You need to create stored procedure[^] and call it in a loopCreate Procedure DoSomething @dept NVARCHAR(30) ASBEGIN --your query here WHERE TBL1.[Department]=@deptENDTo loop Departments in query, read about Common Table Expressions[^]. You need to use recursive query...
Answer 9 May 2013   license: CPOL
Please, follow below links:How to: Host Controls in Windows Forms DataGridView Cells[^]How to add DateTimepicker control within a DataGridView column type[^]CP articles:Generic DataGridView V2.0[^]DataGridViewExtension[^]
Answer 9 May 2013   license: CPOL
To do it on server side:--declare variable to store values in format: '1,2,3,4'DECLARE @storedValues TABLE(myValues NVARCHAR(30))DECLARE @selectedValues TABLE(myValues NVARCHAR(30))INSERT INTO @storedValues (myValues)VALUES('1,2,3,4')INSERT INTO @selectedValues...
C#
Answer 9 May 2013   license: CPOL
Please, use Search Box[^] on the right-top corner of page.First result:Riverside Internet Forums[^]
Answer 9 May 2013   license: CPOL
Please, read solution1 by _Damian S_. It's very good.Please, change your query:Declare @active tinyintset @active=select IsActive from tbl_OPDappointment where Docket_no=@Docket_nowith:Declare @active tinyintselect @active=COALESCE(IsActive, 0) from tbl_OPDappointment where...
Answer 9 May 2013   license: CPOL
Please, refer these:Returning Data by Using OUTPUT Parameters[^]How to specify output parameters when you use the sp_executesql stored procedure in SQL Server[^]A simple example on how to get Return and Out parameter values using Ado.Net[^]HOW TO: Call a Parameterized Stored Procedure by...
Answer 9 May 2013   license: CPOL
Try this:SELECT t1.username, t2.attributeFROM userAttributes AS t1 INNER JOIN Attributes AS t2 ON t1.attrFK = t2.attrIDWHERE t1.username = @username[EDIT #1 - missing attributes]SELECT attribute AS MissingAttributeFROM Attributes WHERE attrID NOT IN ( SELECT t2.attrFK AS...
SQL
Answer 9 May 2013   license: CPOL
Please refer these links:Join Fundamentals[^]sql joins[^]And great article: Visual Representation of SQL Joins[^]
Answer 8 May 2013   license: CPOL
Did you hear about threads?Threading tutorial[^]How to create threads[^]How to: Create and Terminate Threads (C# Programming Guide)[^]
Answer 7 May 2013   license: CPOL
The simplest way to backup/restore Access database is to use File.Copy[^] method ;)More about copying/restoring access databases: Copy a database object[^]Back up a database[^]I recommend you to compact and repair database[^] before copying operation.Please, see past...
Answer 5 May 2013   license: CPOL
First of all, read my comment.Untill your database is not relational database[^], you can't simply avoid duplicates.How to create realational database? Creating A Quick MySQL Relational Database[^]After that you need to learn about JOIN's[^]. To understand differences between LEFT,...
C#
Answer 5 May 2013   license: CPOL
See past answer: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine[^]More from other...
Answer 5 May 2013   license: CPOL
Have a look here:How to: Read Text from a File[^]How to: Write Text to a File[^]
Booting windows over lan by Maciej Los
Answer 5 May 2013   license: CPOL
Please, use Google! Next time, please, be more specific and provide more details. Shortly describe your needs.I think this set of links will be enough for start!CCBoot - LAN Boot Software for Windows[^]How to Install Windows 7 over a Network using Linux – PXE, DNSMasq, and Samba[^]How...
Answer 5 May 2013   license: CPOL
I think there is too many to explain, but..One of the reasons is in using IsNull[^] function. Please test it:Option ExplicitSub TestIt()Dim sTmp As StringsTmp = ""MsgBox "Is null: " & IsNull(sTmp) & vbCr & "Is empty: " & IsEmpty(sTmp), vbInformation, sTmpEnd...

Page 1 of 29
1 2 3 4 5 6 7 8 9 10


Advertise | Privacy | Mobile
Web03 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid