|
-
Mar 19th, 2011, 04:16 AM
#1
Thread Starter
Member
Datagridview / Date inserting QuestionS.
Dear Sir,
I have already made a connection to my DataGridview through SQL command and records is displaying on my Windows Form (VB2010).
Sir, my requirement is I do not want to display complete records and I want only to see the last records of the Datagridview. Pls correct my codes.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As ystem.EventArgs) Handles Button2.Click
daDG.Fill(dataset, "EmpList")
DataGridView1.DataSource = dataset
DataGridView1.DataMember = "EmpList"
End Sub
And also Sir, pls advice me how to INSERT date into a Table my code as follows:
conn = New SqlConnection(connstring)
Dim sql As String
sql = "insert into EmpList (Date,EmpName) values(???,'" & Textbox2.text & "')"
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|