|
-
August 28th, 2001, 07:53 AM
#1
Urgent plzz help
Set db = DAO.Workspaces(0).OpenDatabase("rem.mdb", False, False, ";pwd=urs")
Set dt = db.OpenRecordset("Name")
this is how i am opening a database
i dont have data control or ado on my form
when i try to find with the coding
dt.FindFirst ("Jhon")
i get an error message that "not supported by this object"
and when i use this coding
dt.FindFirst = ("Jhon") or dt.FindNext = "Jhon"
i get an error message argument not optional
plzz help me
-
August 28th, 2001, 07:56 AM
#2
Re: Urgent plzz help
You must specify what you re looking for
dt.FindFirst "Firstname='Jhon'"
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
August 28th, 2001, 08:04 AM
#3
Re: Urgent plzz help
Sorry friend it is giving me same error
"Object not supported for this type of object"
-
August 28th, 2001, 08:27 AM
#4
Re: Urgent plzz help
You can use SQL
sSQL = "select * from Table where name = 'John'"
open recordset dt using this SQL
and if dt.RecordCount = 0 then ' record is not found
otherwise
sName = dt!Name
Iouri Boutchkine
[email protected]
-
August 28th, 2001, 08:29 AM
#5
Re: Urgent plzz help
Hi, some recordset types do not support the FindXXXX methods.
Try specifying the Recordset to be a Snapshot or Dynaset.
'Replace the dbOpenSnapshot const with dbOpenDynaset as you require
set rsData = db.OpenRecordset(RecordsetSQL , dbOpenSnapshot)
the syntax shown in the previous posting for the find methods is correct.
-
August 29th, 2001, 09:39 AM
#6
Re: Urgent plzz help
write the following code
set rs = db.openrecordset("select * from xyz",dbopendynaset)
then the next find sytax what you have specified is ok this should work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|