How to compare inserted text in (textbox1.text) with
existing database value in (Sqldatasource1) in visual
studio 2005 ?
Answer Posted / amol
Dim strValue As String
strValue = txtValue1.Text
Dim rstData As ADODB.Recordset
rstData = New ADODB.Recordset
rstData.Fields.Append("A",
ADODB.DataTypeEnum.adInteger, 0,
ADODB.FieldAttributeEnum.adFldKeyColumn)
rstData.Fields.Append("B",
ADODB.DataTypeEnum.adVarChar, 10,
ADODB.FieldAttributeEnum.adFldIsNullable)
'rstData.Fields.Append("C",
ADODB.DataTypeEnum.adVarChar, 0)
rstData.Open()
rstData.AddNew()
rstData.Fields("A").Value = "1"
rstData.Fields("B").Value = "Amol"
rstData.Update()
rstData.MoveFirst()
If UCase(Trim(rstData.Fields("B").Value)) =
UCase(Trim(strValue)) Then
MsgBox("True")
Else
MsgBox("False")
End If
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Explain about the basic features of Visual basic?
What is Internet Explorer and its uses?
Is there any way to pass a variable to a form apart from using global variables?
What is rdo in vb?
Where can I get updated VB and other Microsoft files?
What are the important components of OLEDB?
How many objects resides in ADO ?
What is meant by building a recordset.
What do you know about user forms.
Clear property is available in ____,___ control.
How do I access C style strings?
What are some methods you can use to send data from one VB executable to another one?
How to find size of the file. Which method or function is used to occomplish this?
1s it posible to Create Tables Through Querydef?
How to use advanced data-bound controls.