Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASSIGNING BOOKMARKS TO RECORDS

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
0
0
US
I am trying to assign bookmarks to an array 1 to 20 and use the indexed bookmarks corresponding with indexed text boxes to bring up records to edit. Each row of text boxes is bound to a record in the recordset. By clicking on a bound text box I use the bookmark to set a row(record)to the current record. I will then edit the text boxes in that row and use the update method to save the edits. Sound O.K.?? The following code gives me an error.
rst.movefirst
b=1
bkmrk(b) = rst.bookmark
I get an error &quot;run-time 3251 The operation requested by the application is not supported by the provider&quot; and the line:>>> bkmrk(b) = rst.bookmark <<< is high-lighted.

I am using VB6.0, ADO, SQL, Access 2000 Database.

Why would bookmarks not be supported ??

Thank You for any help,
TNN, Tom
TNPAYROLL@AOL.COM
[sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Hi,
sorry it didnt sound ok to me. The exact purpose of using bookmarks in ur case is not so clear. Could you be more specific as to the necessity of using bookmarks here. Sincerely, i am a bit confused as for ur requirement.

As for the error, well in ADO some of the methods and properties are provider specific. i.e., some providers support them and some do not. Be sure to check whether ur provider supports these methods before using them. Well, my view about the bookmarks is to use them when i am moving away from a record and in future i have to return to that same record after a commit or a rollback of transaction etc.

All the best...vijay
 
Hi Gantibabu,
I am using the bookmark to bring up the current record that I want to edit in my recordset. I am using a row of text boxes for each record. I want to bookmark the records as I fill the text boxes and then be able to call up a record(row of text boxes) with a click on a text box in that row, using the bookmark to do this.

I am not using a server but simply using a Access Database and accessing it with ADO in VB6.0. Using a SQL statement to create my recordset. Is not the Access 2000 Database my provider and does not this Access Database allow for bookmarks???

Maybe I'm missing it somewhere. Is not the above the way to do it?
TNN, Tom
TNPAYROLL@AOL.COM

[sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Is your array of bookmarks defined as datatype Variant? [sig][/sig]
 
Hi cmmrfrds,
Yes my bookmark is defined as a data type variant:
Dim BkMrk(1 to 20) as Variant
Am I on the right track? Can I use update method to update changes made to ADO bound text boxes?
Binding code:
Set txt1(i).datasource = rst
txt1(i).datafield = &quot;RATE&quot;
Move to record that corresponds to text boxes, edit text boxes, then use rst.update to update table.
All help is appreciated.
TNN, Tom
TNPAYROLL@AOL.COM [sig]<p>TOM<br><a href=mailto:WWW.TNPAYROLL@AOL.COM>WWW.TNPAYROLL@AOL.COM</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top