Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

katlegoM

@katlegoM
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Please help me here, I need to insert data from datagridview to ms access table, and I keep getting an error that says the insert into statement contains the following unknown field name : 'Username',please help me fix this.thanks
    K katlegoM

    Thanks everyone for your responses,I managed to fix my code, now everything is fine. :-D

    C# help csharp linq graphics game-dev

  • Please help me here, I need to insert data from datagridview to ms access table, and I keep getting an error that says the insert into statement contains the following unknown field name : 'Username',please help me fix this.thanks
    K katlegoM

    Alright thank you Dave I will.

    C# help csharp linq graphics game-dev

  • Please help me here, I need to insert data from datagridview to ms access table, and I keep getting an error that says the insert into statement contains the following unknown field name : 'Username',please help me fix this.thanks
    K katlegoM

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.OleDb; namespace EmployeeAttendanceRegister { public partial class SignIN : Form { public SignIN() { InitializeComponent(); } public OleDbConnection GetsqlCon() { string connstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:/Users/game/Desktop/3rd year/2nd Semester/INYM 328/EmployeeAttendanceRegister/EmployeeAttendanceRegister/EmployeeAttendanceRegister.accdb"; OleDbConnection mycon = new OleDbConnection(connstring); mycon.Open(); return mycon; } public void getComm(string connstring1) { OleDbConnection sqlcon = this.GetsqlCon(); OleDbCommand sqlcomm = new OleDbCommand(connstring1, sqlcon); sqlcomm.ExecuteNonQuery(); sqlcomm.Dispose(); sqlcon.Close(); sqlcon.Dispose(); } private void button1_Click(object sender, EventArgs e) { try { string col1 = dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string col2 = dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string col3 = dataGridView1[2, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string col4 = dataGridView1[3, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string col5 = dataGridView1[4, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string col6 = dataGridView1[5, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string col7 = dataGridView1[6, dataGridView1.CurrentCell.RowIndex].Value.ToString(); string insert_sql = "INSERT INTO Attendance(Username,Lastname,Firstname,Cellnumber,Officenumber,DepartmentName,Passwrd) VALUES('" + col1 + "','" + col2 + "','" + col3 + "','" + col4 + "','" + col5 + "','" + col6 + "','" + col7 + "')"; this.getComm(insert_sql); } catch (Exception ex) { MessageBox.Show(ex.Message); } }

    C# help csharp linq graphics game-dev
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups