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
Which language is used in visual basic?
What is ActiveX Dll and ActiveX Exe?
What is rdo in vb?
How do you make a TEXTBOX read only? Or, how do I prevent the user from changing the text in a TEXTBOX?
which property of menu cannot be set at run time.
What is ado data control in vb?
How would you attach an ActiveX control in Your Application?
What is script control?
What are the properties of datacontrol?
what are the different Types of Recordsets.
what are the Types of LockEdits in RDO?
what are the types of cursors in DAO?
Draw Sequence Modal of DAO and Explain?
DHTML Is used for what?
what is use of book mark in excel ? send answer in my id ashishpal11@rediffmail.com