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
Is it posible to Create Tables Through Querydef?
How would you add elements in TreevieW Control.
What are the uses of List View Control?
What is form in visual basic?
How do I call help files from a VB program?
Explain the "cursortype" and "Locktype" in VB?
Types of LockEdits in DAO?
Clear property is available in ____,___ control.
Is visual basic c#?
How do I get my application on top?
Explain about literals?
Is the Access Engine and Visual Basic Pro good enough for database work?
Explain about declaring variables in Visual basic?
What is controls in vb?
Which language is used in visual basic?