|
When a dataset is created by code (Untyped) the
Datatable.find(Textbox1.text)
Find method is not working...
But when dataset is created by Wizard, it is working fine..
Why ????
|
|
|
|
|
Hi,
I guess there is no method like "Find" for Datatable Object....
u can use
drFoundRow = Datatable.Rows.find(Textbox1.text.Trim)
to get the appropriate Row.
Regards,
Ritesh
|
|
|
|
|
I m exactly using this code..
But when I use untyped dataset
dim ds as dataset
it gives error..
I f i take dataset from controls(toolbox) which is the typed sataset..
It is working fine.
I wanted to know .. why ???
Thanks in advance for your reply
Suman Singh
|
|
|
|
|
What is the main difference between Display member and Valuemember property of a listbox or a combobox.
|
|
|
|
|
Hi,
The very basic difference is that user/Customer can see "DisplayMember" on UI while Developer can work with "Valuemember" which is hidden behind the DisplayMember..
I would like to give u one simple example........let's say ur combobox supposed to show the Country list. when u fetch the records from DB u will select Country name along with it'd ID.(select C_ID,C_Name from country)
Now while showing these records u will show the Country Name on ur UI hance u will set "DisplayMember" of combobox to "C_Country" while doing any DB related thing u will require the ID of the selected Country hence u will set Valuemember with "C_ID"
Now u can access the ID of selected Country using SelectedValue Property of Combobox as cboCountry.SelectedValue Property
I hope this will help u...............:->
Regards,
Ritesh
|
|
|
|
|
hi,
almost 7 years later, you answer helped me understand the difference
|
|
|
|
|
15 years later... Now it helps me a lot. Thank you for this answer. Very clear and concise.
|
|
|
|
|
I want to chech whether a dataset is blank or there are any record in it ?
A sample code will be more helpful.
Thanks
|
|
|
|
|
Hi,
U can check the Dataset or Datatable whether they have any data(Rows) in it as follows..........
If Not dsNewData Is Nothing Then<br />
If dsNewData.Tables.Count > 0 Then<br />
If Not dsNewData.Tables("TableName") Is Nothing Then<br />
'If u want u can check for dsNewData.Tables("TableName").Rows.Count>0<br />
MessageBox.Show("Table has :" & dsNewData.Tables("TableName").Rows.Count & " Rows")<br />
End If<br />
<br />
End If<br />
End If
I hope this will help u..............
Regards,
Ritesh
|
|
|
|
|
I m trying to fetch rows from dataview.
Can anyone help me?
A sample code will be more helpful.
Thanks
|
|
|
|
|
Hi,
U can access the records detail from dataview as follows.......
For intRowIndex = 0 To pi_dtTable.DefaultView.Count - 1<br />
MessageBox.Show(pi_dtTable.DefaultView.Item(intRowIndex).Item("ColName"))<br />
Next
I hope this will help u...........:->
Regards,
Riesh
|
|
|
|
|
Hi Ritesh,
Thanks for your all reply.
Can you please let me know,
what have u declared these variables as:
intRowIndex
pi_dtTable
|
|
|
|
|
hello
Private inrowindex as integer
Private pi_dtTable as datatable
whatever the modifier you want use it
|
|
|
|
|
ok...
dim dv as dataview
dv.rowsfilter = "id like 'C%'
Now i want to fetch one record from this dataview..
Please remember i have done this with datatable and dataset..
Thanks in advance for your reply.
Suman Singh
|
|
|
|
|
Hi i have beening to send the following codes to a printer connected to my pc through an ethernet hub, but i could not be able to print a printer-ready data successfully. it only printed out rubbish value
Can anyone help me here?
(the printer ready data are a series of strings that contain Printer Control language which the printer can understand. It the string has been tested by sending it through a parallel port, and it proved it can be read by the same printer.)
Dim Buffer() As Byte
Dim oEncoder As New System.Text.ASCIIEncoding
Dim oEnc As System.Text.Encoding = oEncoder.GetEncoding(1252)
Buffer = oEnc.GetBytes(Chunk)
Dim client0 As New System.Net.Sockets.TcpClient("169.254.192.155","9100")
Dim stream As System.Net.sockets.NetworkStream = client0.GetStream()
stream.Write(Buffer, 0, Len(Chunk))
client0.Close()
stream.Close()
|
|
|
|
|
Hi,
Could anyone help me. I need to read through a text file to find a certain line of text that remains the same and then change it to a different line of text and save it. I am using VB 6 but having no luck.
If anyone could help it would be great.
Thanks
|
|
|
|
|
Unless the change you make is exactly the same length as what you're replacing, you'll have to read in the entire file, make the change, and write the entire file back out.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can the style/font/color of a header in a datagrid be changed selectively using VB.NET? If Yes, How?
|
|
|
|
|
Right click on the datagrid and select autoformat...
It will help you a bit...
|
|
|
|
|
Dear Sir,
I am exporting picture from a picture box to the power point slide. but when i m reaching line code
ActivePresentation.Slides.Paste
i am getting error no Run time error 429
"ActiveX Component Can't create Object".
Please help me by checking the below code.
i m giving the refence of Ms Power Point 11.0 Object Library.
Dim ppApp As PowerPoint.Application
Dim ppPresentation As Presentation
Dim ppSlides As Slide
Set ppApp = New PowerPoint.Application
ppApp.Visible = True
Set ppPresentation = ppApp.Presentations.Add
ppPresentation.Slides.Add 1, ppLayoutTitle
Clipboard.Clear
Clipboard.SetData Picture1.Image
ActivePresentation.Slides.Paste
Thanks
Murtuza Patel
|
|
|
|
|
Hey, im fairly new to VB.net and am coding a game of sorts which requires Collision detection
the way i have set it up is that whenever "pic" moves 4 functions check to see if it is in collision with "wall"
this is one of the functions, it checks to see if it has collided on the right side
Function cd1()
If (pic.Left + pic.Width) = wall.Left Then
If pic.Top < wall.Top Then
If (pic.Top + pic.Height) > (wall.Top + wall.Height) Then
'MsgBox("IT WORKS")
Dim Form10 As Form10
Dim Form1 As Form1
Form1 = New Form1
Form1.Show()
Me.Hide()
End If
End If
End If
End Function
Hand please
|
|
|
|
|
I m using wininet.dll in my vb application.
My application was working fine but some how it is giving me error that
Run-time error '435':
Can't find DLL entry point HttpsendRequestA in wininet.dll.
Any body can help me.
Thanks in advance
Jatin Mehta
|
|
|
|
|
hello, how can i validate the data entered in the data grid before sending it to the database???
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskhandlingerrorswithwindowsformsdatagridcontrol.asp
|
|
|
|
|
hi all i am doing a project in steganography
for this i need to set & retrive data (a string) to an image
plz can anyone help me with this
i would be thankful to them
|
|
|
|