Tuesday, February 16, 2010

Category and category naviagtion

to day we learnt how to incorporate sql and grid view into our prototype website. some of the code also seem similar to wat we done last year
like some of these codes
Dim DBConnection As New MyConn
Dim MyConnection As New Data.SqlClient.SqlConnection(DBConnection.geConnString)
Dim cmdGetCategories As New Data.SqlClient.SqlCommand
With cmdGetCategories
.Connection = MyConnection
'alloe us to creat a query\
.CommandType = Data.CommandType.Text
.CommandText = "SELECT * FROM XYZCategories"

End With
' this is store in memory
Dim dsResults As New Data.DataSet
'this is telling the adress of were the data is or what other langauge is avaible does not have to be
' SQL
Dim daDataAdapter As New Data.SqlClient.SqlDataAdapter(cmdGetCategories)

daDataAdapter.Fill(dsResults, "AllCategoryNames")
MyConnection.Open()
MyConnection.Close()

No comments:

Post a Comment