![]() |
Add record from ADODB.Recordset |
Post Reply ![]() |
Author | |
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() Posted: 03 April 2007 at 5:49am |
I am new to this software.
I could not load data from a .mdb using adodb.recordset in the Report control to use as ListView.
Will you please kindly guide me in 'loading, adding, editting, updating' like work in the Report control?
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Again, guide me what is wrong with the attached project 'Report Try.zip'.
I could not load data from the database. I tried a lot in many ways, but winced.
Help me, please.
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
No body seems to help me in this topic.
Is this topic sounding stupidity?
|
|
![]() |
|
OscarM ![]() Groupie ![]() Joined: 07 November 2005 Status: Offline Points: 72 |
![]() ![]() ![]() ![]() ![]() |
Hi, change
Set pItem = Record.AddItem(adoRS!CompanyName) with Set pItem = Record.AddItem(adoRS.Fields.Item("CompanyName").Value) |
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
Or:
Set pItem = Record.AddItem(CStr(adoRS!CompanyName)) |
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Hi
My many many thanks goes to 'OscarM' and 'jcollier'
Thank you so much for your nice help.
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
One more time, please!
How can I convert it to Virtual Mode?
|
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
The Online Documentation has step by step instructions and an example. Just go to the help file and search for SetVirtualMode
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Once I had gone through the online documentation. It has just the simple instruction without adding data from a database.
I want to add data from a database in virtual mode. How can I do that?
|
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
In the Online Documentation, check out
Private Sub wndReportControl_BeforeDrawRow In that event, replace the data in the sample with the recordset data. You should be able to figure it all out with the documentation and the info in this post ;) |
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Hiya 'Jcollier'
I tried a lot to get the desired result following the online documentation, but winced.
It would be so kind of you to guide me with making necessary changes in the project I uploaded in this topic.
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
I am still waiting
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Help me pliz. I could not figure out how to do it.
|
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
How many rows are you going to have? The data only has 93 rows which is not enough to need Virtual Mode
|
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
My database seems to grow more than 10,000,000.
Moreover, I want to learn the way to add data from a database in Virtual mode.
Guide me please.
|
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
Short of writing the code for you (which I don't have time to do) I'm not sure what else to tell you. The SetVirtualMode section of the help file has pretty much everything you need except you'll replace the given values with values from the recordset the BeforeDrawRow event.
Also, the example generates 20000 random records. You won't need to do that part either since you already have your records in the recordset. So, I think you would do the following: set your array variable. Loop through the recordset, adding the values to the array add a Template record (as it does in the help file) reportcontrol.populate reportControl.SetCustomDraw xtpCustomBeforeDrawRow in BeforeDrawRow set it up to use your columns and your array variable. |
|
![]() |
|
naikosen ![]() Groupie ![]() ![]() Joined: 01 April 2007 Location: United Kingdom Status: Offline Points: 23 |
![]() ![]() ![]() ![]() ![]() |
Thank you jcollier
I tried a lot, but winced.
I need a complete example of it.
Correction made to the attached Project will be much appreciated.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |