Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Dao: Nomatch, Ado:?


What is the equivalent of the dao's nomatch in ado?thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
NoMatch?
hi,

im using ADODB, is there any function similiar to NoMatch function?

NoMatch In ADO
Is there an equivalence of NoMatch in ADO ?
Like in DAO, we can use
tbgen.Findfirst "Number = 3"
If tbgen.NoMatch Then

How can we handle the fact that they were no results to a specific Find action in ADO...?
Thanx !

Nomatch
Hi guys,
I did a db proggie using dao awhile back, now i upgraded it to ado, (both use data controls for simplicity). in the sub i do a search for a certain record, i used something like data1.recordset.nomatch if there wasent a match, but the adodc dosent seem to have this, or does it? If it dosen't how can i do the same thing?
Dragnut

Can't Use FindFirst And NoMatch
Hi Friends!

I'm current using adodb to connect my database...but i juz encountered this problem...i couldnt use the FindFirst and NoMatch function...but i need these func for my program..any alternatives?

thanks for helping...

What Is Another Method Besides .NoMatch
Hello,
I am trying to somewhat duplicate a bit of code that was originally written using a data control and I am using ADO. The original code has a line

Code:
If (.NoMatch) Then
but I get errors with that. I found out that ADO doesn't use the .Edit method and I am assuming the same with this.
So, what is an equivalent method for this?
Thanks,
kpearson

Nomatch Property In ADO
Hi Folks,
Can anyone tell me what is the equivelent of the nomatch property (DAO) when using ADO. If, as I suspect there is none, what is the best way of coding around it ?
Thanks

John B

Do .Nomatch Need Add In Any References(in VB6)?
Do .Nomatch need add in any references(in VB6)?

Nomatch Property
I am working with a recordset that once used ADO and the property rsrecordset.nomatch... what can I use now that I am using ADODB to read the recordset?

Unable To Use .Nomatch Property
Hi I cant seem to get the .NoMatch property to work,
this code is straight out of VB help, but comes up with error saying "invalid property .nomatch" (last line of posted code)
and fair enough cause when i go to the recordset and in the available list of properties 'nomatch' doesnt appear

do i need to add a particular reference? ive tried heaps and none seem to work
weird as the code is pretty much straight out of help, with exception of my pathnames

any ideas?

Dim tdfTest As TableDef
Dim rstSource As Recordset
Dim rstConflict As Recordset
Dim fldLoop As Field
Dim dbsResolve As Database
Set dbsResolve = OpenDatabase

("\Karrinyuphousehouse.mdb")
Set tdfTest = dbsResolve.TableDefs("tblStock")

If tdfTest.ConflictTable <> "" Then

Set rstSource = dbsResolve.OpenRecordset( _
tdfTest.Name, dbOpenTable)
Set rstConflict = dbsResolve.OpenRecordset( _
tdfTest.ConflictTable, dbOpenTable)
rstSource.Index = "[d_Guid]"
rstConflict.MoveFirst

Do Until rstConflict.EOF
rstSource.Seek "=", rstConflict![s_Guid]
If Not rstSource.NoMatch Then

Proper Use Of The NoMatch Event
My problem is that in VB6 I can't seem to use this "NoMatch" event properly.

Code:Set SQLrs = SQLCon.OpenRecordset("SELECT * FROM Utilities WHERE Date = ' " & strDate & " ' ; ")
If SQLrs.NoMatch Then
MsgBox ("Sorry, no record found.")
Else

This gives an error message that this operation is not supported by this object.
This error happens even if record exists.

Any assistance would be appreciated.



Edited by - camelsaq on 4/19/2005 11:45:49 AM

Seek Method/NoMatch Property
Ok, this should be simple but I'm not finding a lot of help info on this subject.

I've got data on an Excel Workbook. This data consists of just a unique customer code and customer name, which when searched the function should return whether the record exists or not.

I'm getting an error. Object doesn't support this property or method on the following code:
customer = "103005"
customers = Workbooks("Tracs Macros.xls").Worksheets("Sheet3")
rs.Index = "customers"
rs.Seek "=", customer
If rs.NoMatch = True Then
MsgBox "Not found"
Else
MsgBox "Found"
End If

Previous code just had simply:
cname = Worksheets("Sheet3").Columns("A").Find(customer, _
LookIn:=xlValues, lookat:=xlWhole).Offset(0, 1).Value

Which also errored out if it doesn't find it.

I just need a return of a boolean value.

Any help would be grateful.

Nomatch To Findfirst Losing Recordset
I have been racking my brain on this one for days now. I have searched the posting but still can not find a solution.

I am using VB6 with Access 2000 to do a lookup to a DAO recordset using Findfirst. As long as the record exists everything works great. If the record is not in the recordset then the recordset goes empty and when I try and Addnew it give me "cancelled by associated object" error message. I have tried checking BOF and EOF but to no avail.

Here is the code....any help would be greatly appreciated!!

Check_ID:
searchstr = "ID = " & Val(add_stud_id)
stdDisp.student.Recordset.FindFirst searchstr
If stdDisp.student.Recordset.NoMatch Then
 'If no student record then look up in cross reference file
    searchstr = "student_id = " & Val(add_stud_id)
    stdDisp.id_crs_tbl.Recordset.FindFirst searchstr
    If stdDisp.id_crs_tbl.Recordset.NoMatch Then
       If chk_cross.Value = 1 Then
       'If no cross reference then create cross reference
       'If creating a cross reference then get ID number
           new_id = ""
           valid_id = False
           new_id = InputBox("Enter ID: ", "New ID")
           'Make sure new ID does not already exist
           GoTo Check_ID


At this point it would loop back to verify that ID does not already exists. If nomatch then it goes on to do an Addnew and gets and error.

.nomatch Property Not Supported In Data Environment!!
I have a VB application that I link to an Access 2000 database. I linked the database using the Data Environment. I can add, delete and move through the records just fine. I can use the find command to locate records as well. However, I cannot get the .nomatch property to be supported when I am using find or seek. How do you get the property to be supported using the Data Environment??

Any help would be greatly appreciated!!!

Kevin

How 2 Avoid A Recordset.NoMatch Error Message ?
I use:
Dim SearchText$
SearchText = InputBox("Enter Text to Search - Exactly as it appears", "Search")
datStudent.Recordset.Index = "ClassName"
datStudent.Recordset.seek "=", SearchText

If datStudent.Recordset.NoMatch then
datStudent.Recordset.MoveFirst
End If


how can I avoid the default "No current record" ?
(some like On Error...)
H - E - L - P

··(Tip): 2 get code from this page - first paste it in2 FrontPage and then in2 NotePad...
··
··Best Regards - Yovav Gad
··EMail: Development@SuperMain.com
··Web-Site: http://www.SuperMain.com

Making "NoMatch" Case-Sensitive
Hi there, I am using the NoMatch function to check whether a match is found in the database, compared with a user-input string. It works, but the search is NOT case-sensitive. Is there a way to make the NoMatch function case-sensitive? I have thought of using the UCase function but I am not sure on where to code it. Below is my code:


Code:
Data1.Recordset.FindFirst frmNewUser.criteria1
If Data1.Recordset.NoMatch Then
MsgBox "Invalid login, try again!"
Thanks a lot!

ADO Equivalent Of DAO "nomatch"
In DAO, vb6, there is a property called "nomatch" to see if a record already exists. Does anyone know how to do this in ADO?

ADO "NoMatch" Request
Hi there. I was used to use DAO with my databases, but now I've got to use ADO for my newest program. Formerly, when I was doing a search in my DB, I was using Seek and NoMatch (with DAO) to know if something was found.
Something like this:

Code:
Private tbDescriptionVal As Recordset
'.....
'.....
tbDescriptionVal.Seek "=", TableType, TableCode

If tbDescriptionVal.NoMatch Then
'....
End If


Now I would like to do something similar with ADO, how do you do this since there is no ''NoMatch'' property...?

"NoMatch" Not Defined????
Dim db As Database
Dim rs As Recordset
Dim cQuery As String
Dim cName As String

Set db = OpenDatabase("dataconfig")
Set rs = db.OpenRecordset("SELECT * FROM User")

cName = "MrP0STMAN"

cQuery = "Name = '" & cName & "'"

With rs

.MoveFirst
.Find cQuery

If NoMatch Then

blahhblahhhblahhhhhh.

End If

End With


im getting this error msg. "Variable not Defined" for "NoMatch" why? i dont have to declare NoMatch right?

Copyright © 2005-08 www.BigResource.com, All rights reserved