Home > Net >  C # student management system (connect to the database)
C # student management system (connect to the database)

Time:10-14

A freshman training ah, I won't, head hurts

CodePudding user response:

First of all you say is what links database Oracle essentially or other second a little like you in any way link database system with EF simple practical convenience

CodePudding user response:

Like you this kind of training program, you can directly Access the library, simple and convenient, online search a handful, put a data to add, delete, change, check the four function block is ok,

CodePudding user response:

Online search code

Let me give you an example
Using System. The Data. The OleDb;//Access

OleDbDataAdapter da;
OleDbConnection con=new OleDbConnection (@ ". The Provider=Microsoft Jet. The OLEDB. 4.0; The Data Source=c: \ MyList2 MDB ");

con.Open();//the open access

String query="update list set [items]=? , (desc)=? . [link]=? Where ID=?" ;
OleDbCommand updatecmd=new OleDbCommand ();
Updatecmd. Connection=con;
Updatecmd.Com mandText=query;
Updatecmd. The Parameters. AddWithValue (" item ", the item);
Updatecmd. The Parameters. AddWithValue (" desc ", itemdesc);
Updatecmd. The Parameters. AddWithValue (" link ", photo);
Updatecmd. The Parameters. AddWithValue (" ID ", keyvalue);
Updatecmd. ExecuteNonQuery ();
MessageBox. Show (" info updated ");

CodePudding user response:

To help find a database class to go, also don't need you to write, direct call
  •  Tags:  
  • C#
  • Related