Greetings!
Hi, I'm a vb starter. I've inserted an adodc data control into a form.

With adodcIncoming
        .Recordset.Find "p_id = " & "'" & txtPatientId.Text & "'"

Above is a code snippet. After this block of codes, I'd like to check if p_id = txtPatientId.Text is found or not, how can I do that?

I know that with a data control, I could use .Recordset.NoMatch method. However, with an adodc, it's not available.
Please help.

Regards.

Well here is my point on this. Why not loop through the recordset (which is an abstraction of a table object, based on criteria you have specified) until p_id = txtPatientId.Text ?

i.e. (pseudo-code)

Do until .recordset.EOF
if p_id = txtPatientid.Text then
' then do what you must
end if
.recordset.MoveNext
Loop

Patient ID eh? Are we doing some sort of a program related to medicine?

Hope this helps!

Greetings.
Why haven't I thought of that way?
LOL. Thanks a lot! Yeah, it's a clinic medical system.
Thanks.

Greetings!
Hi, I'm a vb starter. I've inserted an adodc data control into a form.

With adodcIncoming
        .Recordset.Find "p_id = " & "'" & txtPatientId.Text & "'"

Above is a code snippet. After this block of codes, I'd like to check if p_id = txtPatientId.Text is found or not, how can I do that?

I know that with a data control, I could use .Recordset.NoMatch method. However, with an adodc, it's not available.
Please help.

Regards.

''use this code rather than the other one because if your record in the database
'' composed of thousands of records or millions, it would hang your system and
'' waste your time...

With adodcIncoming
.requery '
.Recordset.Find "p_id = " & "'" & txtPatientId.Text & "'"
if .recordset.eof then msgbox "no record was found" else msgbox"gotcha!!!"
end with

is ADODC capable of multiple search such as:

"id = '" & text1.text & "' or lastname = '" & text1.text & "'"

how to save data using ado data control?
what is the code for that?
help me pls11

Try -

Adodc2.Update

Please open a new post with your question seeing that this post is already 4 years old, pleeeeease.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.