16,010,291 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Love 2 code (Top 25 by date)
Love 2 code
9-Oct-13 10:33am
View
I don't like it. It's sniffing in other peoples lives.
Love 2 code
24-Sep-13 12:46pm
View
I suggest adding a column team_master_id to the table DataCard_Master and fill that column with the chosen id from Team_master. There you have your connection.
Peace!
Love 2 code
23-Sep-13 5:13am
View
The statement I had written had the three dots ... in it, so naturally, it wouldn't work. For it to work, you got to replace the dots with the right columns!
Peace
Love 2 code
20-Sep-13 5:39am
View
Ok, what is not working, what insert statement did you try?
Love 2 code
19-Sep-13 11:45am
View
So you just have to fill in the corresponding column names in the Select
SELECT
ll.employeeid, @leaveid, ll.status,(use columns from tables ll, lu and e or getdate()),e.employeename
Love 2 code
19-Sep-13 4:22am
View
Hi, sure, there is an example with a DataGridView at cp:
http://www.codeproject.com/Tips/581869/Paging-DataGridView-in-Csharp-using-LINQ
hope that helps.
Love 2 code
19-Sep-13 4:15am
View
Deleted
And btw., you never use cat, so you could lose that code altogeter:
Dim cat As ADOX.Catalog = New ADOX.Catalog()
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & databaseName & ";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Password=123;")
cat.ActiveConnection.Close()
cat = Nothing
Love 2 code
19-Sep-13 4:13am
View
Hi, the ADOX.Catalog could be missing the property 'ActiveConnection', if you are sure, that you can use that property via late binding, you could add
OPTION STRICT OFF
on top of your code file.
Love 2 code
19-Sep-13 4:05am
View
You can store and load the image as a byte stream in the database. A possible column type for sql server would be varbinary.
Greets
Love 2 code
19-Sep-13 3:51am
View
Maybe you want to try >paging< - this technology gives you the data in defined blocks.
Love 2 code
12-Sep-13 11:36am
View
Hi,
the column gamesplayed is unknown at the old level, you can use another subselect:
SELECT NAME, gamesWon, gamesPlayed,
(gamesWon / gamesPlayed) AS winRatio
FROM
(
SELECT
g.gameName AS Name,
(SELECT COUNT(gw.gameId) FROM games gw WHERE g.gameResultOut = 1 AND g.gameWon = 1 AND gw.gameUserID = u.user_id) AS gamesWon,
COUNT(g.gameId) AS gamesPlayed
FROM
games g
INNER JOIN user u ON u.user_id = g.gameUserID
GROUP BY g.gameId, u.user_id
ORDER BY winRatio DESC
LIMIT 1
) t
Love 2 code
12-Sep-13 8:08am
View
Hi,
not exactly clear what you want to do. I guess you should use a 'Group By' clause And a 'HAVING' clause like 'HAVING SUM(clear_protect) != paid' .
Love 2 code
12-Sep-13 7:55am
View
Hi, you could always edit the fields directly in the datagrid.
Love 2 code
12-Sep-13 5:37am
View
Have you tried using an inner joins instead of the left joins?
Love 2 code
12-Sep-13 4:15am
View
Have you looked into bulk insert, and there might be another way look here:
http://stackoverflow.com/questions/4883376/how-to-bulk-insert-into-mysql-using-c-sharp
Love 2 code
12-Sep-13 4:09am
View
Hi,
an insert statement does not have a where clause, if you want to update existing data use an update statement like
UPDATE mytable SET LATTITUDE = 'abc', LONGITUDE = '123' WHERE CLIENTS_ID = 42;
Love 2 code
11-Sep-13 6:25am
View
Hi, the out of the box DateTimePicker control does not allow null values, so you could google for a nullable DateTimePicker control.
Love 2 code
11-Sep-13 5:16am
View
Hi,
you could create a Function and use it in the Join clause:
CREATE FUNCTION getOpeningDate (@closingDate datetime)
RETURNS datetime
AS
BEGIN
declare @openingDate datetime
SELECT @openingDate = MAX(pm_date)
FROM prtMonitor
WHERE pm_date < @closingDate
return @openingDate
End
GO
.....
JOIN @prtMonitor AS openMonitor
ON openMonitor.ID_prt = closeMonitor.ID_prt
AND openMonitor.pm_Date = getOpeningDate(closeMonitor.pm_Date)
.....
Love 2 code
10-Sep-13 5:20am
View
After inserting a row you can query the id of that new row with "SELECT ID = @@IDENTITY". You can then store this id together with the department in a list, so you can use it when inserting the employees.
Love 2 code
9-Sep-13 11:51am
View
You could try using comboBox2.SelectedText instead of comboBox2.SelectedItem, this gives you the id as Text.
Love 2 code
9-Sep-13 11:43am
View
Ah, just now I understood your question. Is it possible to store the sold units per date in the database instead of the available units, this would make your query quite easy.
Love 2 code
9-Sep-13 10:44am
View
You could 'Group By date' and use SUM(prt_price * (Opening-Closing)) AS TotalPrice as the second result column.
Love 2 code
9-Sep-13 10:09am
View
Make sure, that all users have read permission on the list.
Love 2 code
28-Nov-12 13:45pm
View
If you could use the System.Data.Odbc.OdbcCOnnection to connect to your mysql DB, you could use an System.Data.Odbc.OdbcParameter. If that doesn't work, you need a 3rd party dll, to establish your mysql connection from .NET.
Love 2 code
19-Nov-12 11:01am
View
Hi,
i guess, you're digging too deep.
Try
Dim nod As XmlNode = xd.SelectSingleNode("/AdminTools/App")
Greets
T.
Show More