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 ?

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


Please Help Members By Posting Answers For Below Questions

Explain the "cursortype" and "Locktype" in VB?

4466


What is the use of Scalewidth and ScaleHeight Proeperty?

1927


What is the default model of the form?

2082


what are the Differences between ActiveX Control and Standard Control?

3642


what is the Difference between Linked Object and Embedded Object?

2218


How can you check whether a record is valid record or Invalid record using ADO control or Object?

1873


Difference between Tabletype and Snapshot?

1918


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

1980


What is hyperlink?

2032


Difference between Dynaset and Snapshot?

2046


What is constructors and distructors.

2238


What language does visual basic use?

920


What is script control?

1001


What is data binding in vb net?

921


what are the types of cursors in DAO?

1900