15,911,711 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 Member 12719658 (Top 19 by date)
Member 12719658
22-Jan-19 9:24am
View
I apologize if I came across wrong. I edited my question previously since I was on my phone writing it. As per my edit, I was just wanting to know what would be the best way to store data in a database without losing the integrity of the formatted data from a C# program. I have noticed before by updating or inserting data from a string - character returns and spacing have changed and I wanted to make sure I didn't lose them. So I asked if encrypting or hashing would be better. However, I provided a block of code as an example of what would be stored and was only to show the format of the text. I didn't realize that compressing and decompressing would do the trick.
I apologize if I was not clear enough and will give you stars for your help. I just could not see where Ordering came into play, however, I may have wrote a question that was not understandable.
Thanks for your help.
Member 12719658
21-Jan-19 18:18pm
View
Well, that had nothing to do with my question. It was asking if I should update database with formatted text or encrypt it / hash. Nothing to do about ORDER BY or AUTOINCREMENTS or DataTypes. I think your response was auto generated or something so no points for you.
Member 12719658
20-Jan-19 23:28pm
View
Well, right now I am AES encrypting the text. Everything works fine, but not sure if i should keep it encrypted or would hashing it to hex or something would be better.
What do you think? The code blocks that I insert into SQLite can be pretty long (its actually text from my .cs files and could be text from java file also) so I do not know if there is a way to make sure to keep the integrity of the format more secure or would encrypting it be fine.
I do not care about security of the files really.
Member 12719658
10-Apr-18 0:03am
View
I will use the improve question widget and move my response. I am sorry that my original question did not make sense; however, it did in my mind at that time. To have the responses that I had were totally immature and people that want to reply and just make statments like "You are unhappy, too bad for you" is just ignorant. I would think if a question is not concrete enough to understand a simple, "Can you supply more information because it is unclear why you are asking" is far more respected then an insult or childhood drama. Maybe 3 tours in Afghanistan made me see differently and I cannot see the humor behind their reaponses, but it just seems irresponsible and not very professional from someone that wants to call themselves a professional.
Thank you and I will "improve my question.
Member 12719658
9-Apr-18 7:43am
View
I am 45 years old, full time job and not going to school. My daughter is 7 years old. There was no "guiding" involved, but complete put downs. I never took coding when I went to school and I am sure schools these days dont ask for a project about dogs barking. I will just tell my daughter to write everything down and we can try to figure out the percentage and math on paper. Assuming is not the correct way to reply to a person question.
Member 12719658
9-Apr-18 0:22am
View
Thank you for your reply; however, I may have not explained it correctly or you do not undertand what I wrote. Instead of saying I have a lack of logic why don't you instead ask if I could be more clear? Otherwise, please do not reply at all.
I understand a bark is an event, but my statement is not meaningless and it has logic that makes perfect sense.
What I am looking for is a way to get a prediction of when a dog would bark the most throughout the day, week or month. If I have a record that shows that an event occurs 3 times during a week at 10 am and twice at 1 pm, and to track that event for one week would show that the dog barked 33.33% of the time at 10 am and 66% of the time at 1pm. This, to me, is perfect programming logic.
Now if the dog barked on Monday at 10 am and again at 1 pm then again on Wednesday at 1 pm that would change the percentage to not only 33% at 10 am, but would make Monday 66% of the barks.
What I am not understanding is when trying to come up with a percentage how would someone take onto account a day, week and month?
Member 12719658
14-Sep-17 15:09pm
View
I have watched many tuts and think I have a working API. At least I it is working on my PC. Now, I need to put it online, however, not sure where and what will the web address be? What files go online and how do I put other files in WPF program so when user clicks a button it will use the API and check?
Member 12719658
4-Sep-17 10:26am
View
Thank you for that link. Now, I am sure this should be a different forum question, but right now I am using godaddy with a dedicated server on a Linux server. I see letsencrypt you have to have apache enabled and this comes with godaddy's Linux, however, I might change to Windows server instead so I can add some online forms. Do you know about SSL on Windows hosted server?
Member 12719658
3-Sep-17 19:32pm
View
Looking at my website - godaddy charges for HTTPS that I cannot afford right now. If my website will not be HTTPS enabled right now, I will just need to encrypt the API code correct?
Member 12719658
3-Sep-17 19:21pm
View
Completely understand.
Member 12719658
3-Sep-17 18:33pm
View
Thanks for the reply. Yes, the namespace does match my application. That part I didn't copy and paste over.
The errors are now only in regard to:
1. Cannot implicitly convert type 'object' to 'int' (int usage = dataReader["Usage"];)
2. (in the DBConnect class)The name 'kc' does not exist in the current context
3. (in the DBConnect class)The name 'usage' does not exist in the current context
4. (in the WPF Window)The name 'getKeyCode' does not exist in the current context
5. (in the WPF Window) The name 'UpdateKeyCode' does not exist in the current context
Member 12719658
3-Sep-17 17:16pm
View
Regarding this code - I am trying to test and I am getting a lot of errors that names do not exist in the current context and also names cannot be found. If you have time - could you look over the code and/or send me a demo solution?
Member 12719658
3-Sep-17 14:59pm
View
Question - with this code it will leave the connection string in the code. Would this be vulnerable having the server connection string to my online database hard coded?
Member 12719658
3-Sep-17 14:55pm
View
Thank you for your reply. I will check this out and test to see if I have any issues. Always, when it comes to this type of subject - I want to test everything to see what direction I need to go.
Member 12719658
2-Sep-17 23:17pm
View
Great! Thank you for the API link. This is going to be a huge help. With your example and help on this link i think i can have this closed.
Member 12719658
2-Sep-17 22:27pm
View
Thank you very much for the reply. So with this call I suppose the controller is a file located on my web. If so, I don't see where it is looking into a database and if value is there and other value = 0 then authenticate. I have never created API's before so sorry if I am completely clueless on this.
Member 12719658
4-Sep-16 22:23pm
View
Thanks P_Z. I accepted yours as the Best Solution because I like your idea of creating a temp table to do this. Now, I will need to search on how to put this into my original code. :)
Thanks again P_Z. I figured out how I need to do this. This was awesome and very fast to get a response. This can be closed as I am using your suggestion. :)
Member 12719658
4-Sep-16 21:35pm
View
Thank you for the quick replies. I found out that the column "Value" is a tinyint datatype, which is causing issues while trying to run the statement. I am trying to come up with a way to copy the table to another table then run it - Like in P_Z reply. Unless you have any suggestions?
Member 12719658
4-Sep-16 14:50pm
View
So, with your suggestion, it should look like this?
SqlCommand objcmd = new SqlCommand("SELECT LastName, FirstName, ( case Value
when 1 then 'Started'
when 2 then 'Stopped'
when 3 then 'Stopping'
else 'Unknown'
end )as Status, FROM table1", myConnection);
Keeps saying error on the Fill(dt).
Show More