Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Add record from ADODB.Recordset
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add record from ADODB.Recordset

 Post Reply Post Reply
Author
Message
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Topic: Add record from ADODB.Recordset
    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?
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2007 at 6:00am
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.
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2007 at 6:53pm
No body seems to help me in this topic.
Is this topic sounding stupidity?
Back to Top
OscarM View Drop Down
Groupie
Groupie
Avatar

Joined: 07 November 2005
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote OscarM Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2007 at 3:16am
Hi, change
Set pItem = Record.AddItem(adoRS!CompanyName)
with
Set pItem = Record.AddItem(adoRS.Fields.Item("CompanyName").Value)

Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2007 at 10:17am
Or:

Set pItem = Record.AddItem(CStr(adoRS!CompanyName))
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2007 at 7:11pm
Hi
My many many thanks goes to 'OscarM' and 'jcollier'
Thank you so much for your nice help.
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2007 at 9:00pm
One more time, please!
 
How can I convert it to Virtual Mode?
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 11:18am
The Online Documentation has step by step instructions and an example.  Just go to the help file and search for SetVirtualMode
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 11:39am
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?
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 11:50am
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 ;)
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 7:22pm
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.
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2007 at 6:33pm
I am still waiting
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2007 at 8:12pm
Help me pliz. I could not figure out how to do it.
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2007 at 10:17am
How many rows are you going to have?  The data only has 93 rows which is not enough to need Virtual Mode
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2007 at 6:33pm
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.
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2007 at 10:08am
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.
Back to Top
naikosen View Drop Down
Groupie
Groupie
Avatar

Joined: 01 April 2007
Location: United Kingdom
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote naikosen Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2007 at 2:48am
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.