Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Visual Basic





See Related Forum Messages: Follow the Links Below to View Complete Thread

Data Bound Tree View
Can Some One Help Me In This Problem
I Want To Attach The Tree View To The Data Control
So That Tree View Contents Can Change According To My
Database Values
Ican Use Ado Or Dao

Data Bound Grid
How to retrive data using data grid ?
I am using ADO to access to the Access database.

Thanx
by Loh

Using Data Bound Grid
Hi,

I'm using VB6. In the data bound grid, there are 2 date fields. The first date field displays the data correctly. However, the second
date field will display the first field data if it contains a null value in the data file.

How can I display the second field as null value in the data bound grid ?

Thanks in advance !

Data Bound Grid
I went into components and clicked on databound grid and list so they will be on my tool bar. K that was no problem. I then tried to use the Grid and put it on my form (new) and it comes back with an error saying I do not have the license or it can't find the license ro run this component. I have VB6 SP4 professional. What do you think is the problem? or ddid I miss something in the components section?

thanks for your help.

Scoutt

Data Bound Grid Control (SP3)
I am using Visual Basic 6.0 on a Windows 2000 NT operating system. I have created a program on another pc which makes use of DBGRID32.OCX. However, when installing on new pc, I am encountring the following errors:

Line 52: Property OleObjectBlob in DBGrid1 could not be set.
Line 52: Cannot load control DBGrid1; license not found.

I have seeked Microsoft Knowledge Base and I found that I should register db grid by typing:

c:winntsystem32REGSVR32.EXE c:devpdbgrid32.ocx (In this case a message box appears stating that the file was registered.) Yet, the errors still occur.

Would be grateful if you could help me urgently.

Regards,
Renzo

How To Bound Some Data From SQL Query To GRID?
From some of my question about "How to use Grid without Database?" that no body answer me? Now I try to change my algorithm. The new question is "How to bound data from SQL Query to GRID?". I have been use GRID that bounded with some datasource and now I want to change it to SQL.

Resizing Data Bound Grid
How do I set the control to automatically resize the cells to fit all the text in??

MS Data Bound Grid Control 5.0 (SP3)
I am using the Data Bound Grid Control in Unbound mode. I have 2 columns and would like to add a Name in the first column, Values (String) in the second column.

HOWEVER, when trying to populate the rows, my program stops at:

grd1.Row = 1

with error 'Application-defined or object-defined error'.
Alternatively, depending on grid properties, i get the error 'invalid row number'.

There does not seem to be a funtion to add rows.

HOW DO I ADD ROWS without this error occuring?

Once I do this I would like to be able to edit entries in the Value column only, but I think i can manage that bit ok!!

Simon

Data Bound Grid Control
Have just installed VB6 Professional Edition. I selected the complete option but don't seem to have the Microsoft Data Bound Grid Control 5.0 (SP3) as required by the Database Tutorial 3.

Could someone please tell me where I have gone wrong?

Data Bound Grid (this Is Tricky)
basically i want to hilight rows. I will be finding text and every row with that text in it i want to hilight . Now all i need to know is how to do it. Thanks..

Data Bound Grid Problem
I need to be able to add a new row so that i can insert the data from the database. but i am not sure as i have already tried using the for loop to increase the row number. This didnt work. Please Help.

Set rs = New ADODB.Recordset
Dim a As Integer
Dim b As Integer

SQLContact = "SELECT * FROM Contact WHERE aKey = " & lblKey.Caption & " ORDER BY Name DESC"
rs.Open SQLContact, cn

Do While Not rs.EOF = True
a = a + 1
rs.MoveNext
Loop
Set rs = Nothing
Set rs = New ADODB.Recordset
rs.Open SQLContact, cn
DBGrid.ApproxCount = a

'enters into a particular place of the grid

DBGrid.Refresh
DBGrid.ReBind
For b = 0 To a
If Not rs.EOF = True Then
DBGrid.Col = 0
DBGrid.Text = rs.Fields("First").Value
DBGrid.Col = 1
DBGrid.Text = rs.Fields("Name").Value
DBGrid.Col = 2
DBGrid.Text = rs.Fields("Telephone").Value
DBGrid.Col = 3
DBGrid.Text = rs.Fields("e-mail").Value
rs.MoveNext
End If
Next b

DataCombos Within A Data Bound Grid
Is there a way to have a DataCombo box within a column of a data bound grid? I am using VB6 with a SQL2000 database?

I would like for the user to be able to select from a list of values for certain columns of the grid.

Are there existing components that have this ability, or must it be coded?

Any help will be greatly appreciated.

Data Format To Bound Grid
I have a date field in a table that is in the format yyyymmdd and when I display it to a bound flexgrid I would like to reformat it to mm/dd/yyyy. I believe it can be done using the StdDataFormat but am having problems trying to make it work. Does anyone have an example, or a better way to do this?? Thanks in Advance!!

Licensing Problem Of Data Bound Grid
Hello All,
I have a problem with the Data Bound Grid control of Microsoft. When I
tried to place a Data Bound Grid control in a form, a message is coming
telling that the 'Licensing information is missing'. What could be the
reason for the problem. Is it possible to get the control with the licence
information from any site. If so, please direct me in the proper direction.
Please give the me the necessary information.

Thanking you in anticipation,

Sunil

J & P (O) Ltd,
Saudi Arabia.

Data Bound Grid Date Format
Is it possible to set the date format for the columns of a data bound grid (DAO)?

Right now, I have short date as the default format, but it comes up with 8/28//2002...

But I want it to be 28/08/02 instead.

Can this be done without setting the regional settings? I don't want it to change whenever the system changes regions.... thanks.

Passing Information From Data Bound Grid
I am having trouble finding the function to use in a data bound grid (DAO). What I'm trying to do, is to allow the user select a record from the databound grid, and then when he clicks the "edit" button, it would pass the "name" field from the data bound grid to a text field on the editing form.

I'm sure this can be done, but I couldn't find the function to do this. I have read about the selbookmarks function, but I don't understand how it can be applied here.

Please help... =(

Woobi.

Ammending Code To Show On Data Bound Grid
Normally when i open an ado code i do it as the code is below.

I would like to know how to ammend the code so it shows it in a databound grid???????????????

I know it has something to do with datasource property but cannot work out the correct place to place it and what to call it with.
I no longer want to show it in a textbox.


VB Code:
Private Sub Form_Load()    Set r = GetData    textbox1.text = r![InvoiceNo]End sub Public Function GetData() As ADODB.RecordsetOn Error Resume NextDim strsql As StringDim r As ADODB.RecordsetDim c As ADODB.Connection Set c = New ADODB.Connectionc.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False; Data Source=.home.mdb;"c.Open strsql = "SELECT * from Invoice"Set r = New ADODB.Recordsetr.Open strsql, c, adOpenDynamic, adLockPessimistic Set GetData = rEnd Function

Copy Text File Into Data Bound Grid In A Sorted Order?
I have a text file and i need to move its contents to DB Grid .
For Eg.
following is my test.txt

ravishah885 kent confirmed posted
ravi_sarla lamar pending
kent8541932 NCSU pending
kent8541933 ohio pending
kent86541934 northcarolina confirmed posted

for each line , I want "ravishah885" to be stored in one cell,"kent" in other ,"confirmed" in third cell and "posted" in fouth cell.
After storing all values i need to sort it in Data bound grid.

please mail me ASAP .
Thanx
ravi

 

Data Bound Control And SQL Server 2K
We have an Access 2000 Front End App that needs to talk to a SQL Server 2000 DB. The current app uses a lot of data bound controls. Will this be a problem when switching to a SQL DB

Grid Like Data View
Sorry for this being such a stupid question, but I was wondering if there was a common control that I could use to display "spreadsheet-like" data in VB?

I see the flexgrid and DB Grid Control and although close, not exactly what I'm looking for. I don't want the data bound to a recordset, I want to read data out of a file and display it on the screen.

I want (like a combo or list box) the ability to "add" rows, define the number of columns and then populate the control with data via code.

I learned VB through VBA and Access. Access has a control like this in the list box control (multi column listbox, seems a little different than the VB listbox). I realize I can add the Microsoft Forms 2.0 control, but that has undesirable effects when I deploy this app. Seems like they don't work well under XP.

Any thoughts?

Eric

Data Grid View Colour
Hey,
Basically I’m creating a stock control system using visual basic, for one of my forms I am displaying data from a database table using a data grid view. The code I am using to display this data is as follows:

vb.net Code:
Imports System.DataImports System.Data.OleDbPublic Class Form3    Dim con As New OleDbConnection    Dim da As OleDbDataAdapter    Dim ds As New DataSet     Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=StockSystemDatabase.mdb"         da = New OleDbDataAdapter("SELECT * FROM tblStock", con)        da.Fill(ds, "Stock")        DataGridView1.DataSource = ds.Tables("Stock")

Now this code ^ works all well and fine and produces the data grid view like so:
http://img520.imageshack.us/img520/1746/datagz4.jpg

Now basically, I want for the stock items with no quantity (eg. Oil Lubricant) to have their whole row to be shaded in red so they are easily visible. How would I go about this and what code would I need to include to change the row colour to red.

Thank you

Why I Cannot Find "Microsoft Data Bound Grid Control 5.0" Component?
Hi guys,

I'm using Windows XP, and I have installed VB 6.0 Enterprise Edition. But why I cannot find "Microsoft Data Bound Grid Control 5.0" component in VB? But Windows 98 can see? What can I do? PLEASE HELP!

THANKS!!

Limitation In MS Data View/VS.NET Server Explorer ????
Hello:

I'm trying to view a DB2 database with a large number of tables. I'm using "Data View" (by opening a database project in MS Visual Interdev. I also tried VS.NET server explorer). The problem I'm facing is that it doesn't show all of the tables. It shows them in alphabetical order and after reaching a limit, it is cropping the view. The left hand pane (Data View/Server Explorer) in the prject window you see the database name, if you collapse it, it shows the database elements like "Tables", "Views", "Stored Procs" etc with a box and "+" sign. If I collapse the "Tables" by clicking on the "+" sign, it displays list of table names. But if I scroll down, it doesn't show all of them. Looks like there is some limitation of the viewer window itself. Because it crops the other elements ("Views", "Stored Procs" etc) too and doesn't show them at all. But if I use arrow key on the keyboard to scroll down, I can see the object names changing in the properties window (which means that in the background it has all the table names) but it doesn't show them in the data view window.
I couldn't find any way arround it. I tried changing certain configuration (Tools|Options and then select "Database Tools"). By unchecking the "Limit SQL outpot to...".

I'd appreciate any help on how to configure it to view all of the tables or how to change the alphabetical order of the view so that if show the tables in reverse order (Z to A). Beucase the tables of my interest are towards the bottom of the list.

Thank you,

Inam

Data Grid With SQL Server
hi for every one

i using Data Grid to connect SQL Server DataBase with VB

how can i query about some fields in view

for example

Error Record Count is a name field in DataBase view
how can i query about Error Record Count

if Error Record Count>0 then

msgbox"Wrong"

thank you .

Bound Data Fields Not Bound
I am connecting to an Oracle data base via ADO. When I open my form the first time, the first record is displayed, but then, when doing a "moveNext" or "movePrev" or a "moveFirst" or a moveLast", the fields are not updated on the screen, but when I check the recordset programmatically, the record is the correct record (the next record or previous record and so on).

Now, for the crazy part: when I close this form and open it a second time all is well, the first record is displayed and as I navigate through the recordset (next, prev, first, last) the correct record is displayed on the form.

Any ideas?

Thanks,
zina

Data Grid Not Populating SQL Server Table
I wrote program in visual basic and use access as back end, now i have installed sql server 2000 and now i am converting my program as per slq server 2000 requirements. When i tried to populate datagrid with sql server 2000 table , a message appers "The rowset is not bookmark able"

while it was working fine with access database.

Thanx

Bound Grid
Hi All

I wonder if someone can tell me how I can add an extra column to my bound grid. I have tried increasing the column setting but it will not reconise the extra column.

Can anyone please help

Thanks

Non-bound Grid
Is there a Grid or grid-like control in VB that I can use to manually fill with data ( I don't want to bind it to a data control or recordset) and also let the user edit the text directly in the cells?

I don't want to try binding it to a recordset because I want to verify and limit what the users can enter.

- Flexgrid and HFLexgrid are easy enough to fill manually but you can't edit cells directly (Is this true??)

- Datagrid and DBgrid can't be used unbound (Is this true??)

Is there something that I'm missing?

Data Grid Control On Windows 2000 Server
I'm using the data grid activex control to get a quick preview of several printed reports, but it doesn't show anything when running under windows 2000 server. I've checked a hundred times the source code and I'm sure the problem is on the control itself.

Following the advice of this post http://www.xtremevbtalk.com/show...l+windows+2000
I installed the service pack 4 for w2000, hoping to get the bug solved, but unfortunately it didn't work

What are the exact steps to follow to solve this problem? Can anyone please help me? I'm over this bug for more than 6 months... :

Thanks and greetings

TuPoLeV

Grid Bound To A Recordset
any idea about to bind a grid to an ADO 2.7 recorset so when move between rows in the grid the recordset record pointer moves at the same time?

Thanks


rguia

Is There A Grid Control Not Bound To A Database?
I'm looking for a grid control that does not need to be linked to a database. I have a text file with a bunch of records each on a separate line.I want to be able to present this data to the user in a grid format so they can edit fields. Exactly like a spreadsheet would work. I tried using OLE with Excel but it always shows the menu at the top and I can't rename the coumns. The closest thing I've found was the ListView control, but it will not let me edit SubItems as far as I know.

Bound Grid Or Disconnected Recordset?
Hello,

I have a Grid that I displays to the user 6 columns of information. 4 of the 6 columns are derrived from one column value from the database. My question is which approach would be the best for my App to update the results captured by the grid. Because the grid has derived columns that make it easer for the user to choose the mask value for each record...I thought of two ways I could update the underlying table.

1) 2 Grids one Bound and one unbound.
 I could have one grid(A) that represents the the data that I want updated and bind it to the database but keep it invisible and have it work with my other grid(B) when the user updates rows in grid(B) have code that updates rows in grid(A) as they are changed.

Grid(A) ColumnA=dbKey ColumnB=MaskInteger <this would match directly to the table>
Grid(B) ColumnA=GroupID, ColumnB=Description, ColumnC-D=Boolean <this information is collected by several table by joins to get User friendly data for the User>


2) 1 Grid and 1 disconnected Recordset
I could also use a disconnected Recordset with ADO instead of using the Bound Grid(A) use similar logic using the events in the grid(B) to update the recordset the have user commit changes when they click a apply button.

Any Ideas or comments how I could implement these or other ideas? I would enjoy any examples as well!

Thanks
Richard

[SOLVED] Tree View Control - Index Out Of Bound ERROR
When I run the Tree View control I'm getting a - Run time error 35600 Index Out of Bounds - when I choose some fields to view ... not with all. This is the part of the code where I get the error and don't know why..... I tried changing data type - no results.... I'm stuck.

Code:Private Sub mnuSelField_Click()
Call PopluateListView("Select " & TreeView1.SelectedItem.Text & " from [" & TableView1.SelectedItem.Text & "]", FrmView.ListView1)
FrmView.ListView1.ColumnHeaders.Item(1).Width = 5000 <This is where I get the error Width returns a value = 0
FrmView.Show
End Sub

I'm reading records from an Access 2002 Database - VB6

vbprog1144



Edited by - vbprog1144 on 2/14/2004 4:09:26 PM

Truegrid V7 Summing Two Columns On Bound Grid????? PLZ HELP!!!
Hi All,

I'm using Truegrid V7 and I am showing stock figures using a bound ado control. That bit is fine but I also want to have one of the columns as a sum of the other two. Does anyone have any ideas as I am well and truely stuck!

Thanx very much inadvance,

Jiggy!

Bound True Grid Dont Refresh After Delete
I'm having a problem with the grid not getting refreshed after
deleting a record. Even though the record is deleted from the table. I
have the following code in a Delete button event:
sql = "Delete from OrderDetails where Orderid = " &
datOrderItems.Recordset!OrderId
sql = sql & " and ProductId = '" &
datOrderItems.Recordset!ProductId & "'"
gconn.Execute sql
datOrderItems.Recordset.Requery
datOrderItems.Recordset.MoveNext
If datOrderItems.Recordset.EOF Then
datOrderItems.Recordset.MoveLast
End If
datOrderItems.Recordset.Filter = "Orderid = " &
cmbOrders.Columns.Item(0).Text
grdOrderDetails.ReBind

Why does the row that was deleted still show in the grid after the
delete. If I change the filter on the recordset, it will display the
new results, but when I come back to the old Order#, the same contents
will display, even the deleted record. If I close the form and load it
again, the record gone. What the heck is going on. Please help.
Thanks Michael

PictureBox Bound To SQL Server Image
I am wanting to use a picture box to view and update an image that is stored in a SQL 2000 table. The data type of the feild is 'image'.

The following properties of the picture box are set durring design time.

DataField - Photo
DataFormat - Picture 'vb resets this value to blank when app is run
DataSource - Adodc1

For some reason the pictures won't even show up in the picture box, nor can I change them. Does anyone have any pointers as to what I might be missing?

PictureBox Bound To SQL Server Image
I am wanting to use a picture box to view and update an image that is bound to a SQL 2000 table. The data type of the field is 'image'.

The following properties of the picture box are set during design time.

DataField - Photo
DataFormat - Picture 'vb resets this value to blank when app is run
DataSource - Adodc1

For some reason the pictures won't even show up in the picture box, nor can I change them. Does anyone have any pointers as to what I might be missing?

ADO.NET SQL Server Bound Controls And SmallDateTime Type
Ok I am creating a program in VB.NET that has a textbox that is bound with ado.net and BindingContext etc. The field it is bound to is a SmallDateTime. Here is the problem say I put a date in it and save it all is good. Now say I go back and take the date out of the field it keeps coming back. I am pretty sure it has something to do with the BindingContext and dataset but am not sure how to set it to NULL.

Me.BindingContext(Me.dsMediaInfo, "MediaInfo")

This is not right but this is what I want.
TextBox5.Text = NULL

I need to change the current bound record SmallDateTime to NULL

DBGrid, Bound Data, Moving Rows Does Not Update Data Proper
I am using the standard data control along with a DBgrid, I also have text boxes with some of the same data as the dbgrid.
I have the DBGrid and the recordset that populates the DBGrid
and the text boxes bound.
When I change rows in the dbgrid the data changes in the text boxes as I expected but I am also doing a "record number of number of records".
As well as some other stuff similar to the record counts.
Anyway all the text boxes update when I change rows in the DBGrid
but the other stuff does not update proper.
Strange though if I click on say the third line down on the dbgrid
everything updates but the record counter. Then if I click on say the
fifth line down the text boxes update with the correct data but the
record counter will then say record 3 of xx records. Then if I click on
say the 1st line everything updates proper except the record counter.
It will now say record 5 of xx records. Well by now you get the picture the other stuff lags behind by one row click.
I have tried

Private Sub DBgrid1_click()
data.recordset.refresh
End Sub

I also tried
Private Sub DBgrid1_click()
data.recordset.movenext
data.recordset.moveprevious
End Sub

Still doesn't work?????????
Any suggestion would be helpful.

HELP With Data Control And Data Bound List Box
Hi
I am new to Visual Basic and need some help.
I have a Data Control connected to an Access data base, the data base is
very simple with one table and six fields.
I have got text boxes etc. bound to the Data Control, this is all fine.
I have also got a Data Bound List box bound to the data control which is
great to lookup the data in a field of the data base. The only way I can
find of browsing the data is using the arrow buttons of the data control.

Can I change the Recordset of the data control by selecting the record
from the Data Bound List box. Is it possible to do this in code? or at all?

Have I approached this from the wrong direction?

To explain what I require- I need to have a list of the contence of one
field in by data base (say names). I need to select one record (click on
it) and show all the other fields for that record.

Incredibly simple though it sounds I can't find a way of doing it.
Any help much appreciated.
Thanks
Toby Treacher

How Can I View The Data From A Table In List View?
Please let me know how can I view the data from a table in List View?

How Can I View The Data From Table In List View?
Please let me know how can I view the data from a table in List View?

Grid Like View With Dropdowns
I apologise in advance for what to some is so basic..but to little old me its somwthing I need help on. Although a general newbie to VB I strangely have managed to create an application that is even live. I just have never been formally trained in VB hence the obvious question I am about to ask...

I want to create a grid like view for my user that has 4 columns 2 of the columns are to be drop downs. I will fill the data from a database using adodb and allow the user to add to the rows displayed. My issue is I'm not sure which control to use. (sorry basic I know). Believe it or not I think I know how to manage the data bit. I have listviews that I use but can't figure how to mix data from sources. The two sources would be the record saved to the database and also the data to fill the dropdown if the user wants to change the record..hope this makes sense.

Really appreciate your replys...if you can point me in a direction it would be great

Anne

Have Grid View Advance To The Last Record
I've developed an order entry program and I want my flexgrid to automatically scroll to the last record in the grid after a grid.refresh, so that the last entry can be seen. I've looked everywhere to try and figure out how to do this and am getting really frustrated.

Does anyone know how to perform this function through code?

Your help would be greatly appreciated.

View To List / Flex Grid
Without going into too much detail with what im trying to accomplish. Basically I have a user select a component to add into their proposal. The problem is many of these components require that additional components be added.

So I want some sort of popup form showing the related components that should go with the selected components. BUT I must allow them to enter a quantity for each component line item and whether or not they want the component added.

For instance in my database say I have component T007 requires some of the following components:
E005
E006
K670
M780

I want the popup to show these 4 other components..I want to allow the user which ones he / she wants to include and allow for the a quantity for each.
Whats the best control for what Im trying to accomplish???

Whats a sleek idea for this...

Thanks,
Jon

Tree View In Flex Grid
Hi,

I got a requirement as follows :

I need to display a hierarchial set of information in a tree view which lies in the first column of the Flex Grid . When a node is clicked , then it's details (data of 5 columns) must get displayed in the row adjacent to it.

Can any one give me an idea on how to achieve this?

My mail :
V.C.Sekhar Parepalli

Regards,

Sekhar

 

Displaying Data In A (data Grid / Flex Grid)
hi i would like to know how to connect to a Access database and display all records in a flex grid in VB

also i would like to know how to achive the above task from a SQL dadabse using ADO.. in VB

Plz help me...


Shabbeer

Read A Data Bound Value On The Fly
hi

what i want to do is to read a value on the fly basically. i have bound a label on a form to a database that displays an ID number. now i cannot seem to read the current value of this number on the fly i have to use a button.

I am not sure when and how to get the correct number. If i use the event label1.TextChanged event it still shows the previous number, but on display (on the form) it has updated and shows the correct value.

something like this (but not exactly):


label1.databindings.add("text", dstables, "ID")

private sub label1.TextChanged (byval etc) handles label1.TextChanged

messagebox.show(label1.text)

end sub

Data Bound Combo Box
I'm trying to create a program that will populate a data bound combo box from a table in a database. I keep setting the fields to what I want them to be in the properties window, but I'm still only getting one record in the combo box. I have set the databound list controls in the components menu, and the path in my data object is correct and working fine. I just can't get the stupid thing to populate. Any ideas?

Copyright © 2005-08 www.BigResource.com, All rights reserved