Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to compare inserted text in (textbox1.text) with
existing database value in (Sqldatasource1) in visual
studio 2005 ?



How to compare inserted text in (textbox1.text) with existing database value in (Sqldatasource1) i..

Answer / 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

More Visual Basic Interview Questions

How can I access a record by record number?

0 Answers  


Difference between Linked Object and Embedded Object?

0 Answers  


What are the new events in textbox that has been included in VB6.0

1 Answers  


How do I force a file dialogue box to reread the currect disk?

0 Answers  


What do you mean by ADO?

5 Answers   King Indus Software Solutions, TCS,


Explain about creating VB applications in excel?

0 Answers  


What is the max size of textbox?

2 Answers  


What is the use of Connection object?

2 Answers  


How would you add elements and pictures to listitems in listview control?

0 Answers  


How to get free file location in memory?

1 Answers  


What do you mean by HTTP?

4 Answers   Wipro,


What is ado in vb?

0 Answers  


Categories