15,915,833 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 15751945 (Top 5 by date)
Member 15751945
1-Sep-22 0:53am
View
now INSERT is working perfectly , new error appeared with datagridview .
Member 15751945
31-Aug-22 8:53am
View
thanks really for sharing , although I successfully excecated the insert statement , my senario is to add the data of the statment inot DGV and edit and delete from the dgv displayed , i faced this error.datagridview default error dialog system.argumentexception parameter is not valid
Member 15751945
31-Aug-22 2:11am
View
thanks for your explanation , although I am not familiar with queries parameterization, i noticed in many tutorials using my way of writing queries and is executing .
Member 15751945
30-Aug-22 8:05am
View
I retyped it to this :
EmpName this.textBox_EmpName.Text
RegNo this.textBox_RegNo
Job_Title this.textBox_JopTitle.Text
Position this.textBox_Position.Text
Hiring_Date this.dateTimePicker_hd.Text
Country this.Cbox_Country.Text
Birthdate this.dateTimePicker_bd.Text
Gender this.comboBox_Gender.Text
Phone this.textBox_phone.Text
Address this.textBox_Address.Text
Photo this.pictureBox_employee.Image
DeptID this.comboBox_Dept.Text
Member 15751945
30-Aug-22 4:43am
View
I change the dates into this :
string query ="INSERT INTO employee_table(EmpName,RegNo,Job_Title,Position,Hiring_Date,Country,Birthdate,Gender,Phone,Address,Photo,DeptID)Values('" + this.textBox_EmpName.Text + "','" + this.textBox_JopTitle.Text + "','" + this.textBox_Position.Text + "','" + this.comboBox_Dept.Text + "','" + this.Cbox_Country.Text + "','" + this.dateTimePicker_hd.Text + "','" + this.textBox_phone.Text + "','" + this.textBox_RegNo.Text + "','" + this.dateTimePicker_bd.Text+ "','" + this.textBox_Address.Text + "','" + this.pictureBox_employee.Image + "')";