How ?
Thanks for any help !
Printable View
How ?
Thanks for any help !
No databinding at all .;)
What you mean by specific record? I mean how you specify that record?
If you want to read the record number 10, column number 2 for example then one way would be
VB Code:
mydata=myDataset.mytable.Row(9)(1) 'Zero based index 'or mydata=myDataset.myTable.Rows.Item(9)(1)
If you want to read a record based on a primary key or value of a filed, then that would be another story
Yes Lunatic3 , I need to show the whole record after I provide some info .Meaning , show all data based on specific given value .
Got it ?
Thank you
That is what a Select SQL statement is for Pirate.
Select * From table Where something = somthing
Well , I did tried that . See this...
but I want to show all related fields . How ?
VB Code:
Public Overloads Shared Function speificRec(ByVal colum As String, ByVal SearchText As String, ByVal lstbox As ListBox) Dim sql As String = "Select C_URL FROM MyTab" Dim da As New OleDbDataAdapter(sql, MyConnection) Static ds As DataSet If ds Is Nothing Then 'if not filled yet fill it ds = New DataSet() 'fill dataset OpenDB.OpenDB() da.Fill(ds, "MyTab") CloseDB.CloseDB() da.Dispose() End If Try Dim dv As New DataView(ds.Tables("MyTab"), "" & colum & " Like'" & SearchText & "%'", colum, DataViewRowState.CurrentRows) lstbox.DataSource = dv lstbox.DisplayMember = colum Catch x As Exception MsgBox(x.Message) End Try End Function End Class
Pirate, you really need to be more clear. I have no clue what you are trying to figure out.:confused:
you mean all of the values of a specific row?
Then
VB Code:
Dim allvalues as Array allvalues=myDs.myDatatable.Rows(desiredrowindex).ItemArray 'or for dataviews allvalues=myDV.Item(desiedrowindex).Row.ItemArray
yeah yeah Lunatic3:D . That's it . So how can I do then ?
Sorry guys if I confused you ;)
Sorry Lunatic3 , Do you mean this ? I haven't tried it yet! :rolleyes:Quote:
Originally posted by Lunatic3
you mean all of the values of a specific row?
Then
VB Code:
Dim allvalues as Array allvalues=myDs.myDatatable.Rows(desiredrowindex).ItemArray 'or for dataviews allvalues=myDV.Item(desiedrowindex).Row.ItemArray
Yes, then you can play with allvalues array.
Ok , I will give it a shot and tell you what happened .
Thanks Lunatic3 .
Lunatic3 , I used another way around to achieve what I need . I customized the SQL Stat. to load all records for specific table and then used datarow object assigned to label or textbox or whatever .
It's solved now . :D