C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






precee

Send a gift to precee Add precee As Your Friend
Profile
Gifts & Awards
Contributions
Friends
Referrals
Visitors
Messages


Name precee
Email You must Sign In to access the contact details.
Country Singapore
Member Level Bronze
Total Points 0

Profile

To bind data to datagrid
Private Sub BindData()
'1. Create a connection
Const strConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Data\EMPdb.mdb"
Dim objConn As New OleDbConnection(strConnString)
objConn.Open() 'You must open the db connection before populating the DataReader


'2. Create a command object for the query
Const strSQL As String = "SELECT * FROM EMPt"
Dim objCmd As New OleDbCommand(strSQL, objConn)

'3. Create/Populate the DataReader
Dim objDR As OleDbDataReader
objDR = objCmd.ExecuteReader()

dgProducts.DataSource = objDR
dgProducts.DataBind()
End Sub

Return to Members


dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use