What's new

Closed How to Display SQL Database into Datagridview ? Help mga kosa, ASAP!! C# Begginer

Status
Not open for further replies.

PHC - Naethan

Forum Expert
Joined
Dec 27, 2016
Posts
3,374
Reaction
18,119
Points
2,598
Age
22
Hi mga ka PHC!! C# Begginer Help PO!! ASAP..

Pano po mag Display ng Database sa Data Gridview gamit ung Class.cs, Help ASAP!! PLzz po
1581156141966.png


1581156315132.png



-Thank's Adv

AnonYMoozze
 

Attachments

Create an sql command query. It's up to you if you use sql command string(parameterized or bare) or stored procedure. Pass the resultset into datatable or dataset, depending on how you will utilize the resultset. Lastly, bind the data/resultset to datagridview component by setting it as it's datasource. It's that easy. I'm assuming you have a knowledge about the theory of database programming. Good luck!
 
Create an sql command query. It's up to you if you use sql command string(parameterized or bare) or stored procedure. Pass the resultset into datatable or dataset, depending on how you will utilize the resultset. Lastly, bind the data/resultset to datagridview component by setting it as it's datasource. It's that easy. I'm assuming you have a knowledge about the theory of database programming. Good luck!
Pre ang hirap unawain Begginer palng hahahaha
 
Pre ang hirap unawain Begginer palng hahahaha

Here we go again. Another spoon feed. ugh!

Code Snippet:

C#:
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Student", YourConnectionString); 
DataSet ds = new DataSet(); 
da.Fill(ds, "YourDataSetName"); 
dataGridView1.DataSource = ds.Tables["YourDataSetName"].DefaultView;
 
Here we go again. Another spoon feed. ugh!

Code Snippet:

C#:
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Student", YourConnectionString);
DataSet ds = new DataSet();
da.Fill(ds, "YourDataSetName");
dataGridView1.DataSource = ds.Tables["YourDataSetName"].DefaultView;
Sa DataSet(); Maglalagay ako sa loob () ng Dataset Name ba dito?
Tsaka alin ung I-Dodouble Click ko, Para itype yang Code?

Salamat Boss, Sobrang laking Tulong Para maka Graduate kami 😂
 
Sa DataSet(); Maglalagay ako sa loob () ng Dataset Name ba dito?
Tsaka alin ung I-Dodouble Click ko, Para itype yang Code?

Salamat Boss, Sobrang laking Tulong Para maka Graduate kami 😂

Bahala ka jan, ang slow mo kausap. imagine graduating ka na pala hindi pa tayo nagkakaintindihan sa simpleng code snippet lang. ugh!
 
Status
Not open for further replies.
Back
Top