Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,578 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,948 people online right now. Registration is fast and FREE... Join Now!




faster entry into vbal grid from database

 
Reply to this topicStart new topic

faster entry into vbal grid from database

deepmadan
7 Oct, 2008 - 02:11 AM
Post #1

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 7


My Contributions
hi

can anyone help me how to make my programming faster. in my project i am accessing data from a database using ado and copying it into vbal grid.
but as my record increases my copying into vbal grid is taking more time.. and thus slowing down my program.

part of my code:
**************************************

Set db = New ADODB.Connection
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\database\deepvlg.mdb"
set rs = New ADODB.Recordset
i=0
while not rs.eof
i=i+1
vbal1.addrow
vbal1.celltext(i,3) = rs!date_value
..................
...................
.................
like this 30 columns are there

rs.movenext
wend

rs.close
db.close
*************************************

can anyone tell me how to solve this problem

Deepak Madan

you can even mail me your responses to deepmadan@gmail.com
User is offlineProfile CardPM
+Quote Post

thava
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 03:54 AM
Post #2

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 450



Thanked: 18 times
Dream Kudos: 50
My Contributions
this grid is not familiar to me i will try and explain is any other way to solve this
User is offlineProfile CardPM
+Quote Post

deepmadan
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 04:11 AM
Post #3

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 7


My Contributions
this is a visual basic accelerated grid 6.0
in this grid you can put picture in your background...
thats y i am using this grid...

i am having problem of speed in putting entries into this grid..

please reply if you have any solution

This post has been edited by deepmadan: 7 Oct, 2008 - 04:12 AM
User is offlineProfile CardPM
+Quote Post

thava
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 04:22 AM
Post #4

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 450



Thanked: 18 times
Dream Kudos: 50
My Contributions
did you find the way of saving data using savegriddata method , and ising
loadgriddata method

because this method will load data fast

from vb accletarot watch this

8. Persistence
Grid data can be persisted and reloaded very quickly using the SaveGridData and LoadGridData methods. These methods only persist the cell data and row information, so the data must be subsequently re-loaded into a grid with the exact same column structure.


once if you find the way that the datastores in the file it is easy to lwritea file like this and using the loadgriddata method load the datas fastly


i am not sure this will solve the problem but i give a way to the solution

if you have still problem post the code and some sample data here i will try to solve your solution

This post has been edited by thava: 7 Oct, 2008 - 04:24 AM
User is offlineProfile CardPM
+Quote Post

deepmadan
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 04:44 AM
Post #5

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 7


My Contributions


can u help me how to use savedatagrid and loaddatagrid n vb accletarot
can u explain me giving any example or code..
i am unable to use wat u relpied
User is offlineProfile CardPM
+Quote Post

thava
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 05:02 AM
Post #6

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 450



Thanked: 18 times
Dream Kudos: 50
My Contributions
that is first load the grid with your normal method then when you save your data in the database use one line before like this
CODE

vbalgrid.SaveGridData("c:\mydata.dat")

then once again
when you load the data you don't need to your looping code just use the
CODE

vbalgrid.LoadGridData("c:\mydata.dat")

this will increase your speed
if you want to thank me just click This Post Was Helpful! link below

This post has been edited by thava: 7 Oct, 2008 - 05:03 AM
User is offlineProfile CardPM
+Quote Post

akhileshbc
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 05:03 AM
Post #7

D.I.C Head
Group Icon

Joined: 26 Sep, 2008
Posts: 177



Thanked: 3 times
Dream Kudos: 50
My Contributions
Did u go through the site: www.Vbaccelarator.Com
User is offlineProfile CardPM
+Quote Post

deepmadan
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 05:11 AM
Post #8

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 7


My Contributions
thanks thava


this might be helpful let me check..

but i think it wont help me at the time of first loading from the database
as my data in grid is changing continously n whenever i refresh the data i hav to take it from database only...

thanks for the site will be going now and check if i could find something...
User is offlineProfile CardPM
+Quote Post

deepmadan
RE: Faster Entry Into Vbal Grid From Database
7 Oct, 2008 - 06:51 AM
Post #9

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 7


My Contributions
no its not helping yet.......

i needed to upload data from database as per user query which keeps on changing so my data in my grid also changes hence i need a solution to load data faster into the vbal grid from the database.........

This post has been edited by deepmadan: 7 Oct, 2008 - 06:51 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 12:20AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month