yasinmon
asked on
use Like operator in ADO
I am using ADO object , how can I use LIKE operator in ADO
please check the below coding , is it must to use a keyset cursortype
please give me how can I give SQL query in ADO coding while useing LIKE operator
dc.connect
dc.cmd.CommandText = "SELECT p_name from quntity where p_name LIKE '" & "Body*" & "'"
Set dc.rs = New ADODB.Recordset
dc.rs.CursorLocation = adUseClient
dc.rs.CursorType = adOpenKeyset
dc.rs.LockType = adLockPessimistic
Set dc.rs.Source = dc.cmd
dc.rs.Open
dc.rs.MoveFirst
Do While Not dc.rs.BOF
cmbpname.AddItem (dc.rs.Fields(0))
' cmbweight.AddItem (dc.rs.Fields(1))
dc.rs.MovePrevious
Loop
End If
please check the below coding , is it must to use a keyset cursortype
please give me how can I give SQL query in ADO coding while useing LIKE operator
dc.connect
dc.cmd.CommandText = "SELECT p_name from quntity where p_name LIKE '" & "Body*" & "'"
Set dc.rs = New ADODB.Recordset
dc.rs.CursorLocation = adUseClient
dc.rs.CursorType = adOpenKeyset
dc.rs.LockType = adLockPessimistic
Set dc.rs.Source = dc.cmd
dc.rs.Open
dc.rs.MoveFirst
Do While Not dc.rs.BOF
cmbpname.AddItem (dc.rs.Fields(0))
' cmbweight.AddItem (dc.rs.Fields(1))
dc.rs.MovePrevious
Loop
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Mr. acperkins
please explain your comments I don't understand what you mean by thise, becuz I am new in EE.com
please explain your comments I don't understand what you mean by thise, becuz I am new in EE.com
Sorry, I did not notice you were new, but since I had pointed this out to you on on February 21, 2002 (see http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20269516) I thought by now you had figured it out.
In any case let me explain: The concept behind EE is simple, somebody asks a question and experts suggest solutions, after which the questioner can followup with clarifications, but ultimately he/she should award the points to the best solution. If there is no solution offered than the question can be deleted. All of this is explained in great detail in the EE Guidelines (http://devx.experts-exchange.com/jsp/cmtyQuestAnswer.jsp)
You currently have the following questions outstanding:
Bar coding Date: 02/02/2002 07:20AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20262367
Threading Date: 02/02/2002 07:31AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20262371
To store multiple data in single record Date: 02/13/2002 10:54PM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20266653
Connect ing Data Report using ADO objects Date: 02/21/2002 08:16AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20269516
Platform independent or not Date: 03/14/2002 04:52AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=cplusprog&qid=20276871
You also may want to focus on the grading standards in the EE Guidelines. A "B" is not the only grade available.
Anthony
In any case let me explain: The concept behind EE is simple, somebody asks a question and experts suggest solutions, after which the questioner can followup with clarifications, but ultimately he/she should award the points to the best solution. If there is no solution offered than the question can be deleted. All of this is explained in great detail in the EE Guidelines (http://devx.experts-exchange.com/jsp/cmtyQuestAnswer.jsp)
You currently have the following questions outstanding:
Bar coding Date: 02/02/2002 07:20AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20262367
Threading Date: 02/02/2002 07:31AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20262371
To store multiple data in single record Date: 02/13/2002 10:54PM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20266653
Connect ing Data Report using ADO objects Date: 02/21/2002 08:16AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20269516
Platform independent or not Date: 03/14/2002 04:52AM PST
http://devx.experts-exchange.com/jsp/qShow.jsp?ta=cplusprog&qid=20276871
You also may want to focus on the grading standards in the EE Guidelines. A "B" is not the only grade available.
Anthony
Questions Asked 9
Last 10 Grades Given B B
Question Grading Record 2 Answers Graded / 2 Answers Received
Anthony