Click here to Skip to main content
16,019,514 members

Comments by Asghar Sajjad (Top 11 by date)

Asghar Sajjad 23-Dec-11 1:16am View    
Thanks Prakash, you save my day, thanks a lot.
Asghar Sajjad 23-Dec-11 1:04am View    
Thanks for your reply, as you pointed out i will think about it but i want to create a job which i will schedule for every day, my idea was if the user doesn't open an application then the function which is doing this job will not be executed.
Asghar Sajjad 14-Feb-11 2:15am View    
Here is a code...
Private Sub LoadLocation()

Dim con As SqlConnection
Dim connection, strr As String

Dim str As String = "select * from location"

Try
connection = ConfigurationManager.ConnectionStrings("STOCK").ConnectionString
con = New SqlConnection(connection)
con.Open()

Dim ada As SqlDataAdapter = New SqlDataAdapter(str, con)
Dim ds As New DataSet()
Dim dt As New DataTable
Dim dr As DataRow
ada.Fill(ds, "Location")
ada.Fill(dt)
Dim i As Integer

If ds.Tables(0).Rows.Count > 0 Then
For i = 0 To ds.Tables(0).Rows.Count - 1

Me.GridView1.Columns.Add("locationname", ds.Tables(0).Rows(i).Item("locationname"))


Next
End If

Catch ex As Exception
End Try

End Sub
Asghar Sajjad 12-Feb-11 1:34am View    
its giving error too many argument to Public sub Add. i think gv.column.add accept only one argument and we are supplying here 2 arguments, i m not sure.
Asghar Sajjad 12-Feb-11 1:18am View    
please send me code for Typed Dataset.