|
-
Apr 23rd, 2002, 04:52 AM
#1
Thread Starter
Lively Member
Problem with coversion from DAO to ADO
I haven a problem with this conversion. And with my lack of experience I would take a long time finding out how this works so here's the question:
This is the original code:
VB Code:
grdDataGrid1.SelBookmarks.Add datPlanRS.Recordset.Bookmark
and this is how it should look like now:
VB Code:
grdDataGrid1.SelBookmarks.Add rs1.Bookmark
the datagrid was first a regular DBgrid and now it is a MSHFlexgrid. And the connection was a normal Data component and now I'm using a fully coded connection (ADODB connection)
I don't know what this code does but it has come across a few times so I gues it's important 
Anyone know what this is and how I can convert it to ADO?
WiseGuy
I stuck my head out of the window and got arrested for mooning!
This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
O/S: Windows XP Professional (dutch)
Internet: Cable (1Mbit connection)
-
Apr 23rd, 2002, 05:50 AM
#2
Looks like its storing bookmarks to selected records....
What calls those book marks ?
Might just want the id of the record to update.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Apr 23rd, 2002, 06:08 AM
#3
Thread Starter
Lively Member
okey here's a litlle bit more of the code maybe this'll clear out some questions:
VB Code:
rs1.Update
If intOpdrachtId <> 0 Then
If rs1.RecordCount <> 0 Then
rs1.Find ("OpdrachtId =" & intOpdrachtId)
grdDataGrid1.SelBookmarks.Add rs1.Bookmark
End If
I stuck my head out of the window and got arrested for mooning!
This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
O/S: Windows XP Professional (dutch)
Internet: Cable (1Mbit connection)
-
Apr 23rd, 2002, 06:15 AM
#4
Yeah - looks like its book marking the record ready to use it in updating something.
I don't use that method because its bound - and I prefer unbound methods.. longer coding lol
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Apr 23rd, 2002, 06:18 AM
#5
Thread Starter
Lively Member
So you have no Idea how I could convert this?
WiseGuy
I stuck my head out of the window and got arrested for mooning!
This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
O/S: Windows XP Professional (dutch)
Internet: Cable (1Mbit connection)
-
Apr 23rd, 2002, 07:24 AM
#6
The way I see it is that it book marks where it is to return to the same place. ie after finding a new answer without opening the recordset again. Up to you how you do it.
If its adding the selected records to a bookmarks collection - there should be a seection of code which says something like :
rst.bookmark = datagrid1.selbookmarks
Or, it is trying to use the selected rows from the grid in a loop to find out what the user selected (multi select grid).
In that case, you need to recode the bit that uses all the selected records so that it either uses the bookmarks again (Should still be able to - unless ado doesn't use...) or that it checks and uses the flexgrids selected row. I think the flexg rid has selected in one of its properties. You might be able to use that.
Perhaps pasting all the code of the form...? Might give a pointer where its being used.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
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
|