15,907,000 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 Python 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 savedlema (Top 25 by date)
savedlema
1-Aug-14 5:34am
View
Kschuler,
Thank you very much for your input. I managed to do it from your help.
However, I was forced to do some modifications to your code. I'm posting the solution hoping it may also be useful to someone else.
Thank you so much.
savedlema
19-Jun-13 13:23pm
View
Hi Amol_B, are you there please?
savedlema
18-Jun-13 14:07pm
View
Thank you Amol! I think your solution is taking me somewhere good.
I have few questions from your solution:
- You said if there're two orders (Declare @Order INT -– for 2 orders
DECLARE @Menu INT – for Salads ), What will these codes do, I missed the point here.
-Is your code for VB.NET? I think not? Eg. in "Declare @tab AS TABLE", I think VB.NET use Dim instead of "Declare" to declare a variable. Also in "AS TABLE", VB reports an error in "TABLE". What did you want this to do? Are you creating a table called "tab"? (the we could just use the normal CREATE TABLE command?)
-For the "INSERT INTO @Tab", it seems we're inserting these values to a table "Tab"? which is created in the previous lines?
Please help me understand this before I start looping. Please forgive my being a novice.
savedlema
18-Jun-13 8:23am
View
My tables are:
1.Inventory (item,amount)
2. Menu (menu_name)
3. Salad (recipe, amount)
Other tables will be added for each menu, just like I did for salad.
Now, when I click Salad, since it has two values (recipe for it and amount), how then can I subtract these (recipe & amount) from the (amount) in the inventory table?
I find it challenging.
savedlema
18-Jun-13 8:13am
View
Thank you Amol_B!
I have three tables (similar to your solution, except to the third table), can you please tell me more on table 3 of your solution? How is it gonna look like?
Thanks.
savedlema
20-May-13 18:43pm
View
Hi all!
Now I got the code to work perfectly in a windows command prompt, it does all the job. But the problem comes when I bring it to VB.NET, It says the system can not find the file specified.
This is my code in VB:
Process.Start ( "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe" --user=root --password=mypassword --host=localhost --port=3306 --database sakila > "C:\backup\sakilalbackup.sql""")
I will appreciate any help.
savedlema
13-Apr-13 8:54am
View
Thanks OriginalGriff!
But, with VB 2010, I see that "Properties" is not accepted/supported. I see its My.Settings.ConnectingString...
But thank you, I could learn some syntax.
savedlema
11-Apr-13 6:54am
View
Thanks ryanb
. I did what you said and I was able to see this error msg:
"mysqldump:Got error:2005: Unknown MYSQL Server host '127.0.0.1'--databases MySQL databasename -r ""C:\GreatestHR Backup\BackUpDataBase.sql"""
But, the mysql server is really there and working, I can fetch and send data to it with my application. This problem happens only with this backup thing.
I tried to use "localhost" instead of 127.0.0.1 but same problem. I also tried to remove 'password' and add a port number, same problem.
Any advice?
savedlema
16-Nov-12 5:31am
View
Thanks Rob,
I have a question please;
I want to INSERT the result of this query (Total) into a field called "TotalMarks" found in the same table. How to I do that?
I tried INSERT INTO TotalMarks SELECT...(the select query) but did not work.
I also tried INSET INTO tblForm1.TotalMarks SELECT .... but never worked.
Any idea please?
Thanks a lot so far.
savedlema
16-Nov-12 5:30am
View
Thanks Jacques, Your insert is new to me, so I will have to study it, I know its gonna help me a great deal.
Thanks.
savedlema
16-Nov-12 5:28am
View
Thanks Ved, I have a question please;
I want to INSERT the result of this query (Total) into a field called "TotalMarks" found in the same table. How to I do that?
I tried INSERT INTO TotalMarks SELECT...(previous solution query) but did not work.
I also tried INSET INTO tblForm1.TotalMarks but never worked.
Any idea please?
Thanks a lot so far.
savedlema
13-Nov-12 18:01pm
View
I managed to do it psychic6000. Thank you very much for your continued support here.
Blessings to you.
savedlema
12-Nov-12 22:00pm
View
Thank you so much. And, Sorry for not being specific at first. Now,please, Why do I get an error creating a temporary table with :"INSERT INTO #temp SELECT StudentID, Average FROM tblForm1 ORDER BY Average DESC " OR even as simple as this:"CREATE TABLE #Results"? But this "CREATE TABLE Results" works. I thought we put # when we need to create temporary tables (Access), its like I've once done that. Help on that please?
savedlema
10-Nov-12 16:31pm
View
Sory,for now I use Access (.mdb)..anything?
savedlema
9-Nov-12 17:33pm
View
Well, thanks. But, how do I get the row number, for instance, from a GridView? If I can get a row number that could be helpful.
Thanks!
savedlema
9-Nov-12 17:32pm
View
Thank you...But, how do I get the grid view row index? Its not shown by default...
savedlema
9-Nov-12 17:21pm
View
psychic6000, Thank you very much for responding. I tried this:
sqlQuery = "SELECT ROW_NUMBER () " _
+ "OVER (ORDER BY Average desc) AS Rank," _
+ "StudentId as rollNO,Physics,Chemistry" _
+ "FROM tblClass1"
and got this error message "Syntax error (missing operator) in query expression 'ROW_NUMBER () OVER (ORDER BY Average desc)'.". Can you tell which operator is missing? If the code works, I think my problem will be solved.
Thanks so much so far.
savedlema
8-Nov-12 16:36pm
View
Thank you for responding. But, this is what I want:After performing a SELECT with ORDER BY query, the results will be filled to a dataset ("StudentRank").So, let's say I search for a particular student, (say John), from that, I want to get John's position in the class.
In other words, John may probably be stored in dataset.Tables ("StudentRank").Rows (4).Item (2), that will means John is in position 5 (4+1) in the class. Now, I don't want the dataset.Tables ("StudentRank").Rows(4).Item(2), I just want to display Johns marks on the form and also display his rank (5) in the class. Something like this:
StudentID: G23
Physics:80
Biology:70
Chemistry:90
Total:240
Average: 70
Rank in the class:5 (I can solve the above, this is the problem now)
All in all, my point is to be able to determine and display student rank in a class. I have tables for each subject (tblPhysics,tblChemistry...) and a table for a specific class (tblClass1) which will contain (StudentID,Physics,Chemistry.... and display the average score for each student)
I hope I made myself clearer, and thank you for your response.
savedlema
8-Nov-12 16:36pm
View
Thank you for responding. But, this is what I want:After performing a SELECT with ORDER BY query, the results will be filled to a dataset ("StudentRank").So, let's say I search for a particular student, (say John), from that, I want to get John's position in the class.
In other words, John may probably be stored in dataset.Tables ("StudentRank").Rows (4).Item (2), that will means John is in position 5 (4+1) in the class. Now, I don't want the dataset.Tables ("StudentRank").Rows(4).Item(2), I just want to display Johns marks on the form and also display his rank (5) in the class. Something like this:
StudentID: G23
Physics:80
Biology:70
Chemistry:90
Total:240
Average: 70
Rank in the class:5 (I can solve the above, this is the problem now)
All in all, my point is to be able to determine and display student rank in a class. I have tables for each subject (tblPhysics,tblChemistry...) and a table for a specific class (tblClass1) which will contain (StudentID,Physics,Chemistry.... and display the average score for each student)
I hope I made myself clearer, and thank you for your response.
savedlema
8-Nov-12 16:35pm
View
Thank you for responding. But, this is what I want:After performing a SELECT with ORDER BY query, the results will be filled to a dataset ("StudentRank").So, let's say I search for a particular student, (say John), from that, I want to get John's position in the class.
In other words, John may probably be stored in dataset.Tables ("StudentRank").Rows (4).Item (2), that will means John is in position 5 (4+1) in the class. Now, I don't want the dataset.Tables ("StudentRank").Rows(4).Item(2), I just want to display Johns marks on the form and also display his rank (5) in the class. Something like this:
StudentID: G23
Physics:80
Biology:70
Chemistry:90
Total:240
Average: 70
Rank in the class:5 (I can solve the above, this is the problem now)
All in all, my point is to be able to determine and display student rank in a class. I have tables for each subject (tblPhysics,tblChemistry...) and a table for a specific class (tblClass1) which will contain (StudentID,Physics,Chemistry.... and display the average score for each student)
I hope I made myself clearer, and thank you for your response.
savedlema
8-Nov-12 16:32pm
View
Thank you for responding. But, this is what I want:After performing a SELECT with ORDER BY query, the results will be filled to a dataset ("StudentRank").So, let's say I search for a particular student, (say John), from that, I want to get John's position in the class.
In other words, John may probably be stored in dataset.Tables ("StudentRank").Rows (4).Item (2), that will means John is in position 5 (4+1) in the class. Now, I don't want the dataset.Tables ("StudentRank").Rows(4).Item(2), I just want to display Johns marks on the form and also display his rank (5) in the class. Something like this:
StudentID: G23
Physics:80
Biology:70
Chemistry:90
Total:240
Average: 70
Rank in the class:5 (I can solve the above, this is the problem now)
I hope I made myself clearer, and thank you for your response.
savedlema
9-Nov-11 14:14pm
View
friends,Some more help please.
savedlema
9-Nov-11 12:19pm
View
Thank you. I'm following your links just now..
savedlema
9-Nov-11 12:17pm
View
thank you shashikanth 2011, but, please, where do I put these codes in my page?
savedlema
9-Nov-11 11:54am
View
Thanks jim lahey, but, I see you have provided the solution to take when a user doesn't fill anything in the primary key field, but I handled that in a much simpler way. My problem is when a user tries to enter a primary key that has already been entered into the database i.e entering the same MAC address again. That's where I want help. But, thank you for taking your time. Please give some clues.
Frank.
Show More