[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

DBGRID LOCKED

Posted on 1998-10-01
3
Medium Priority
?
166 Views
Last Modified: 2006-11-17
I know this must be easy but here it goes.  I have a db grid that I am running various sql statements as data1 recordsource.  This works fine. all I really want to be able to do is at one point make the datagrid so it is not bound to a datacontrol by pressing a button or by using a if then statement, etc

I would like to do this so i can make the datagrid blank, also I want to make it so the table in the database is not bound to any control in VB.  

Idea's?
0
Comment
Question by:CURIOUS1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 3

Accepted Solution

by:
TheAnswerMan earned 100 total points
ID: 1437656
You can use the GetRows function of an RDO Resultset to pass the resultset into an Array.

then the Grid Will be blank until you decide that you want to fill it with data.

It is a simple matter of using a Do while Loop to Build the Grid as you like.

dim x as long
dim li_Row as Long
Dim li_Col as integer

x = UBound(TheArray(2))-1  'The number of columns
                          'Do This here instead of inside
                          'first loop, otherwise VB has to
                          'Calculate the 'RowCount' for every row

For y = 0 to UBound(TheArray(1))
   For li_col = 0 to x      
     'Assign Whatever Cell you want = TheArray(li_Row,li_col)
   Next y
Next y
0
 
LVL 3

Expert Comment

by:TheAnswerMan
ID: 1437657
The other King thing about the Unbound it that it doesn't add an extra connection<For Each Data Control> to the Server, since these connections arent free.  If your app is multi user.. this can make a big difference.  
Also, since you don't have to open a new connectiont to the database for a Control, Your form probably will load faster, making for a snappy appearance.
0
 
LVL 3

Expert Comment

by:TheAnswerMan
ID: 1437658
The other King thing about the Unbound it that it doesn't add an extra connection<For Each Data Control> to the Server, since these connections arent free.  If your app is multi user.. this can make a big difference.  
Also, since you don't have to open a new connectiont to the database for a Control, Your form probably will load faster, making for a snappy appearance.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question