9,869,444 members (26,369 online)
Visit CodeProject.TV
Discuss CodeProject.TV
Sign in
Email
Password
Forgot your password?
Sign in using
home
articles
Chapters and Sections
>
Search
Latest Articles
Latest Tips/Tricks
Top Articles
Beginner Articles
Technical Blogs
Posting/Update Guidelines
Article Help Forum
Article Competition
Submit an article or tip
Post your Blog
quick answers
Ask a Question
View Unanswered Questions
View All Questions...
C# questions
ASP.NET questions
VB.NET questions
C#4.0 questions
C++ questions
discussions
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work & Training Issues
Design and Architecture
ASP.NET
JavaScript
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
Adobe Technologies
C#
Free Tools
Objective-C
Ruby On Rails
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
.NET Framework
Mobile
VS 11 & .NET 4.5
Sharepoint
Silverlight / WPF
Visual Basic
Web Development
Site Bugs / Suggestions
features
Component & Service Catalog
Competitions
News
The Insider Newsletter
Newsletter archive
Surveys
Product Showcase
Research Library
CodeProject Stuff
community
The Insider News
The Lounge
The Weird & The Wonderful
The Soapbox
Press Releases
Who's Who
Most Valuable Professionals
Company Listings
Non-English Language
>
General Indian Topics
General Chinese Topics
help
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
Site Map
Advertise with us
Employment Opportunities
About Us
The default search term operator is
AND
.
You can use brackets,
AND
,
OR
, and
NOT
to improve your search. For example:
C# AND NOT(VB or SQL)
A query of a single
*
will return everything, filtered by any filters.
Filter examples:
Search by Author
author:"author name"
Filter by tag
tag:C#
or
tag:(C++ or Java)
Wildcard search
use "?" or "*" eg.
gr?d
or
gr*
127 Results
Search
Everything
Articles
Technical Blogs
Tips & Tricks
Questions
Answers
Forum Messages
News Items
Catalog Items
Videos
Training Courses
Just My Stuff
My Bookmarks
Sort by
Relevance
Rating Asc
Rating Desc
Title Asc
Title Desc
Author Asc
Author Desc
Date Created Asc
Date Created Desc
Date Modified Asc
Date Modified Desc
Price Asc
Price Desc
Duration Asc
Duration Desc
Match
All Fields
Title
Description
Author(s)
Tags
Any Date
Last 12 hours
Last 24 hours
Last week
Last 2 weeks
Last month
Last 3 months
Last 6 months
Last year
January
February
March
April
May
June
July
August
September
October
November
December
Rating Range
All - Including Unrated
1.0 - 5.0
2.0 - 5.0
3.0 - 5.0
4.0 - 5.0
4.5 - 5.0
4.8 - 5.0
5.0
Advanced Filters:
Article Topics
All Topics
Desktop Development
Web Development
Mobile Development
Cloud Computing
Enterprise Systems
Database
Multimedia
Languages
Platforms, Frameworks & Libraries
General Programming
Graphics / Design
Development Lifecycle
General Reading
Third Party Products
Mentor Resources
Article License
All Licenses
CPOL
CDDL
Ms-PL
MPL
CPL
Eclipse
MIT
BSD
Apache
CC (ASA 2.5)
Zlib
Public Domain
CC (Attr 3U)
CC (ASA 3U)
LGPL3
GPL3
Forums
All Forums
Feature Forums
General Programming
Web Development
Product Lifecycle
Database & SysAdmin
General Discussions
Non-English Language
Catalog Category
All Categories
Books & Training
Charting & Graphing
Components, Controls, Libraries
Data Manipulation & Mining
Database Tools
Debugging
Documentation & Help
Financial, Math & Scientific
Frameworks & APIs
General Development Tools
GIS & Maps
Graphics & 3D Modeling
Hardware and Robotics
Hosting
IDEs
Imaging
Mobility
Multimedia
Networking
Performance and Profiling
Programming Languages
Project Life-cycle Management (ALM)
Reporting
Search
Security
Setup & Deploy
System Adminstration
Utilities
Virtualization
Web Design/Development
Catalog License
All Licenses
Commercial
Fully Function Evaluation version
Limited Functionality Trial
Limited Time Trial
Shareware
Free For Personal Use
Freeware
Page 1 of 3
Page Size:
10
·
25
·
50
Author filtered by: milenalukic
[x]
How a column change its value after a determined time in Sql Server 2005
by
milenalukic
Answer
3 Feb 2013
license:
CPOL
Hi,You need to change the status column in the table to a calculated field. This will need to be calculated like:Case when publishingdatetimeThis will result in 0 if pending or 1 if published.If you prefer you can replace the 0 and 1 in the calculation to pending or published and...
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
C#
SQL
SQL-Server
SQL-Server
database
C# different options in second list depending on option in first list (late binding)
by
milenalukic
Answer
3 Feb 2013
license:
CPOL
You need to use the onselectedindexchanged event to select your new category and then run your add animal from there.
General Programming
»
Uncategorised Quick Answers
»
General
C#
list
ListView
bind
output parameter in stored procedure and retrieving it in c# with sqlparameter object
by
milenalukic
Answer
3 Feb 2013
license:
CPOL
I found this link very helpful.http://stackoverflow.com/questions/706361/getting-return-value-from-stored-procedure-in-c-sharp[^]
General Programming
»
Uncategorised Quick Answers
»
General
C#3.0
C#
nonullallowedexception was unhandled c# (Column 'Bill Name' does not allow nulls)
by
milenalukic
Answer
3 Feb 2013
license:
CPOL
Hi,The error suggests that the table has a field that does not allow null values.Either one of your variables is null or there other fields in the table that do not allow nulls and do not have a default value set.You can try running the insert statement direct form SQL management...
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL-Server
how can i fill reportviewer with dataset?
by
milenalukic
Answer
3 Feb 2013
license:
CPOL
Hi,You are skipping the creating of the report itself.To use report viewer you either need an server report or a local report. I will assume that you require a local report.Click on the report viewer control to activate it. On the top right you will see a small arrow which will give...
General Programming
»
Uncategorised Quick Answers
»
General
C#
C#4.0
Why this store procedure give me error,
by
milenalukic
Answer
3 Feb 2013
license:
CPOL
Hi,It looks like you are missing some of the syntax for a stored procedure.CREATE PROCEDURE -- Add the parameters for the stored procedure hereASBEGIN -- Insert statements for procedure hereENDGOSo after AS you need to insert BEGIN and END at...
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
Click control on windows activation
by
milenalukic
Question
3 Feb 2013
license:
CPOL
Hi,I have a windows forms application. When I click on a window this activates the form and then I need to click again to call the particular control click event. For example if I click on a button this activates the form and then I need to click the button again.Is there a way to...
General Programming
»
Uncategorised Quick Answers
»
General
C#
LINQ to SQL dynamic Context + Dynamic Table Class?
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,In this case I don't know of a way that Linq can help you.You either need to stick to your current way or look into dynamic SQL.To be honest it's more of a case that if it works don't fix it!
General Programming
»
Uncategorised Quick Answers
»
General
C#
LINQ
Beginner
Data
Help
SSRS report with link to second report works in IE on server but not on win app
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
I found the solution.I had been running an impersonator on visual studio and that was reverting back after running my original report. So when I clicked to view the second report I had no rights - hence the error. I added the impersonator to the form rather than the report and all works...
General Programming
»
Uncategorised Quick Answers
»
General
C#
SSRS
index out of range. error in last line.i want to change the value of last row of cell "Total_Amount_Debit" after loading data in gridview. help me with this. thanx
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,If your grid is set to allow user to add there is always an extra row. Check for that and either do not allow edit or use row count -2.
General Programming
»
Uncategorised Quick Answers
»
General
C#
iteration of xml in sql2005
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,You will need to insert your xml data into a table and then perform your operation on this new table.Depending on your process you may need a temp table or permanent table. If it is permanent you can truncate table when your process is finalised not to have unnecessary data.Hope...
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
SQL-Server
Why default value is not inserting in column when allow null is true?
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,Set the table not to allow nulls and it will take the default value when a value is not assigned on insert.
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
VB
VB.NET
dataset
restrict a form to not open more then one at time
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,Try this:Form myform = null;form_2search myform=null;List frms = Application.OpenForms.OfType().ToList(); foreach (Form f in frms) { string type = f.Name.ToString(); if (type == "FormWebCam") { myform =...
General Programming
»
Uncategorised Quick Answers
»
General
C#
C#4.0
How to save values to Database with current Time.
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,For consistency I would assume you require the server time and not the client pc time.All you need to do is set the Time on your table with a default of Getdate().In this way you don't pass any value on insert.
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL-Server
time
How to save values to Database with current Time.
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,For consistency I would assume you require the server time and not the client pc time.All you need to do is set the Time on your table with a default of Getdate().
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL-Server
time
how can i control the width of columns in a Gridview.
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,Grid view design has properties under Edit Columns.Autosizemode gives various options.For exact width set autosize to not set and width to the pixels you require.For columns to fill the whole available space in the table width set autosize to fill.If you want more than 1...
General Programming
»
Uncategorised Quick Answers
»
General
Gridview
Rdlc Reports Passing parameter to the table design
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,You need to change the report from US to UK format from report properties.
General Programming
»
Uncategorised Quick Answers
»
General
RDLC
how to use two primary keys in table
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,If you believe that you need 2 primary keys it looks like your data is not normalised.It is highly likely that you will need to split your table in to two and maybe also require a link table to map the primary keys of table1 to table2.If two columns together give you your unique...
General Programming
»
Uncategorised Quick Answers
»
General
SQL
Server
Create database in sql and insert the data into the databse dynamically
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,I have a similar application.What I did was to create the necessary tables in my database.Then have a paste button for the user to paste excel copied data to grid.Then a save button to save to the database.The save button runs a stored procedure accepting all the required grid...
General Programming
»
Uncategorised Quick Answers
»
General
C#
how to merge 2 reports with different parameters
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,It seems that you are going about this the wrong way round.What you need to do is a query or stored procedure accepting both parameters to return the required data in the first place. Then create your new report.
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
SQL Job not working properly
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,Have you tried running the code in the job on the test server under that user? It could be a rights issue. Try running each step separately to make it easier to identify where the error lies.
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
SQL
SQL-Server
SQL-Server
SQL2008
Scheduler
Use Foreign key in RDLC Report
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,You need to retrieve the correct data from your DB first and then show it on the report. I suggest amending your query.
General Programming
»
Uncategorised Quick Answers
»
General
C#
VB
VB.NET
Reports
RDL
RDLC
Reporting
VisualStudio2010
SQL QUERY Question to get Average without using AVG()
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
HiFor average you need to do Sum over count and not count/sum.
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
SQL-Server
Showing balance in available stocks in inventory for every day
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,As regards the inwards quantity I cannot see why it will not return values if a record exists in O,P and I.What I suggest is to break down the query and test joining O and P. Then join the result with I and check your results and so on.To include all dates even when not in I you...
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
how to update,delete record from multiple table having primary key and foriegn key constrain?
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,It would help if we knew what fields you have available on update or delete, but here I will assume you have al the fields in the user table.For UpdateCreate Procedure ProcUpdateUser()@logid int,@name varchar(50)as beginupdate user set name=@name where...
General Programming
»
Uncategorised Quick Answers
»
General
C#
ASP.NET
how do i get the below output in t-sql 2008?
by
milenalukic
Answer
20 Jan 2013
license:
CPOL
Hi,As others have mentioned the result for A is unclear.Assuming this is an error what you need to to is:Select wbs_id,wbs_name,startdate1 as startdate, end_datefrom projwbs inner join task on projwbs.wbs_id=task.wbs_idHope this helps you
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
SSRS report with link to second report works in IE on server but not on win app
by
milenalukic
Question
20 Jan 2013
license:
CPOL
Hi,I have a report on SSRS with an action on a textbox to open another report.This works fine when testing on the report server but gives and error when clicking on the link via a win app. The win all calls server report.Error: The report execution has expired or cannot be found....
General Programming
»
Uncategorised Quick Answers
»
General
C#
SSRS
Whats is the best Tabs or multiple Forms ?
by
milenalukic
Answer
18 Oct 2012
license:
CPOL
Well it depends on the functionality you are looking for.If you use multiple forms the users would need to open a form for each control.If the controls are related and are intended for use by the same people, it could be easier to use if all in one form in different tabs.
General Programming
»
Uncategorised Quick Answers
»
General
C#3.0
C#
C#4.0
Forms
Sql command for autogenerate columns
by
milenalukic
Answer
18 Oct 2012
license:
CPOL
Hi,First add in ID column to your database if you have not already done so. Make this the primary key by clicking the key icon. Then in the properties section at the bottom find identity and set it to yes. The seed is the starting number you would like. for example if you want your first...
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
XML data import into SQL 2008
by
milenalukic
Question
18 Oct 2012
license:
CPOL
Hi,I need to import a complex XML file into multiple SQL tables. I have tried using data maps but can only manage to import 1 node at a time. what I need to do is to be able to select foreign keys from parent nodes.Can someone please help?Here is a reduced version of my...
General Programming
»
Uncategorised Quick Answers
»
General
XML
SQL
Winn app to pin to start menu in XP
by
milenalukic
Question
20 May 2012
license:
CPOL
Hi,I am trying to get my win app to have an option to start automatically, by adding it to the startup menu. The user has an option to delete the startup and to add it.I have the following code which works with Windows 7 but gives an error with windows XP. All I can find is that XP...
General Programming
»
Uncategorised Quick Answers
»
General
WinXP
C#
Windows
animated gif in Win app
by
milenalukic
Forum Message
7 May 2012
Is there any control that can be used in windows forms that can take formatted text and animated gifs. In a richtextbox I can place a control(picturebox) with an animated gif inside but I cannot ge
General Discussions
»
Article "Trichtextbox – A Universal Richtextbox Which Can Display Animated Images And More"
Calling a Stored Procedure from another stored procedure
by
milenalukic
Answer
4 May 2012
license:
CPOL
Hi,If I understand you correctly you want t use the results of 1 stored procedure in another.In that case you need to creat a third procedure. This needs to have a temptable or even a normal table to hold the results of the first procedure. Then run he second procedure using the...
General Programming
»
Uncategorised Quick Answers
»
General
Oracle
How to combine two sql statement as single set of row statement
by
milenalukic
Answer
4 May 2012
license:
CPOL
Hi,With the query above yu get 2 rows like:20112012You want your result to look like:2011,2012To do this you need to use a cursor. the cursor will loop through your results and perform an action on them:declare @result varchar(max)declare @rowdata...
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
query
database restore in stuck while uploading in the remote server
by
milenalukic
Answer
3 May 2012
license:
CPOL
Hi,To restore a database you will need to modify it to single user. Then after it is restored change it back to multi user.You do this by right clicking on the database and selecting properties. Go to options. Then on the right hand side scroll to the bottom and amend the Restrict...
General Programming
»
Uncategorised Quick Answers
»
General
SQL
Server
XML import into SQL 2005
by
milenalukic
Question
2 May 2012
license:
CPOL
Hi ,I am importing xml data into SQL server 2005 in this manner:MyXML 1 mydetails 1.1 myproduct ...
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
XML
SQL-Server
how do select favorite Row in sql
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
you need this:=Declare @paydate1 datetimeDeclare @paydate2 datetimeSelect @paydate1 = TOP 2 [pay_date] from [Peyment] where [pay_sm_id]=2 and [pay_cus_id]=3Select @paydate2 = TOP 2 [pay_date] from [Peyment] where [pay_sm_id]=2 and [pay_cus_id]=3 order by [pay_date] descselect...
General Programming
»
Uncategorised Quick Answers
»
General
SQL
SQL-Server
Regarding Where clause condition
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
Hi,The last option should be the fastest as you should have less employees with that name then employees in that city.SQL will perform the first clause and then the second so the first should always be the one with least results unless you are only indexing on the city.I hope this...
General Programming
»
Uncategorised Quick Answers
»
General
SQL
Server
Select Unique row element from a table
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
I would have designed the db differently:Give all partners and ID (numeric). On insert into your join table of partner1, partner2 always make sure they are in numeric order ie if you have partner 1 and 2 always put 1 in the first column if its partners 2 and 1 then you put 1 in the first col...
General Programming
»
Uncategorised Quick Answers
»
General
SQL
Difference between delete and truncate
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
If you have an identity column in your table delete will keep a record of this and when you insert will continue from the last id.Truncate will clear this and start again from 1 or whatever you seed is set to.
General Programming
»
Uncategorised Quick Answers
»
General
SQL
idea to happen sql reports on separate database than same database that is serving web applica...
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
Hi,I had this issue personnaly and did not have the luxory of an additional server.My reports needed to be correct as of close of business the previous day. So what I did was to perform overnight jobs with the complex queries in question and storing the results in a flat file. Then I could...
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
SQL-Server
Reports
performance
Indexes
How to get Values from stored procedure in linq
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
Hi,To read the results of a stored procedure in Linq you need to create a list for the proc to populate:using(objEfoDataContext dc = new objEfoDataContext()){List myresult = new List();myresult= dc.usp_tblPropertyResult().tolist();//myresult will have the data from your stored...
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
SQL2008
Progress Bar in c#....!
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
There are 2 ways to use a progress bar:One is to manage it yourself performing steps when you want the bar to increase:progressBar1.PerformStep();Using this you will need to calculate the number of steps you want and when you want them to show in the code. so if you have 2 steps you...
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQLite Database in C# application
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
Hi,First of all I would do all the database work on the server side using stored procedures. Then you call these as necessary and pass the required parameters.e.g.CREATE PROCEDURE [dbo].[ProcInsertTable1] @value1 varchar(50), @value2 intASBEGIN -- SET NOCOUNT ON added to...
General Programming
»
Uncategorised Quick Answers
»
General
C#
Sqlite
how to get value from listview like gridview?
by
milenalukic
Answer
22 Apr 2012
license:
CPOL
Hi,To read from a listview you can select a particular item first.private void mylistview_SelectedIndexChanged(object sender, EventArgs e) { string listviewtext = mylistview.SelectedItems[0].SubItems[1].Text; }If you allow multiselect you should be able...
General Programming
»
Uncategorised Quick Answers
»
General
C#
SQL-Server
SQL2008
.NET4
open a file using openfiledialog in c# win forms
by
milenalukic
Question
22 Apr 2012
license:
CPOL
Hi,I am tring to write code to open a user file using openfiledialog:private FileStream OpenFile() { // Displays an OpenFileDialog and shows the read/only files. OpenFileDialog dlgOpenFile = new OpenFileDialog(); dlgOpenFile.ShowReadOnly =...
General Programming
»
Uncategorised Quick Answers
»
General
C#
WinForm
deleting rows in the gridview
by
milenalukic
Answer
17 Apr 2012
license:
CPOL
Hi,What you will need to do is to query your dictionary using LINQList mylist = new Listmylist = dict.where(x=>x.value.deptID=yourdepID).tolist();if(mylist.count>0){// value exists// to update you will need to create a new entry// delete the old one// insert the new...
General Programming
»
Uncategorised Quick Answers
»
General
ASP.NET
Gridview
Dictionary
Import XML data into SQL 2005
by
milenalukic
Question
17 Apr 2012
license:
CPOL
Hi,I have the following xml data that I need to import into SQL. ABC-00110 04-11-12 ...
General Programming
»
Uncategorised Quick Answers
»
General
SQL2005
XML
SQL-Server
Re: XML data import to SQL
by
milenalukic
Forum Message
30 Mar 2012
The XML data will be put on my ftp server and I need to read the data. I have created the tables in SQL but now need to write a stored procedure to read the XML. All examples I found only use the
Database & Sysadmin
»
Database
Set result of expression stored as varchar in table to output parameter in SQL Scaler Function
by
milenalukic
Answer
30 Mar 2012
license:
CPOL
Hi,It looks like you have some incorrect syntax here. All I can say without seeing the whole function is this:DECLARE @INPUT VARCHAR(MAX)DECLARE @RESULT VARCHAR(MAX)SELECT @INPUT='10000*0.40+200'SELECT @RESULT = 'SELECT ' + @INPUTSELECT @RESULT AS OUTPUTI hope...
General Programming
»
Uncategorised Quick Answers
»
General
SQL-Server
SQL2008
Page 1 of 3
1
2
3
First
·
Prev
·
Next
·
Last
Advertise
|
Privacy
|
Mobile
Web01 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright ©
CodeProject
, 1999-2013
All Rights Reserved.
Terms of Use
Layout:
fixed
|
fluid