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
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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.
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 Grid Bound To A SQl Server View
Hello freinds,
Most of you would have come across similar situations many times before and would have solved it in your own style and preference. let me explain the situation.
I have the
(1)ItemRefsLookup Table :
CREATE TABLE [dbo].[ItemRefsLookUp] (
[ItemRef] [varchar] (25) NOT NULL ,
[ItemDesc] [varchar] (50) NULL ,
[ItemType] [varchar] (10) NULL )
(2)ItemCostings Table :
CREATE TABLE [dbo].[ItemCostings] (
[ItemCostingsID] uniqueidentifier ROWGUIDCOL NOT NULL , [ItemRef] [varchar] (25) NOT NULL ,
[SubsidiaryCode] [varchar] (3) NOT NULL ,
[QuotedPrice] [decimal](18, 0) NULL ,
[ProdCost] [decimal](18, 0) NULL ,
[SellPrice] [decimal](18, 0) NULL ,
[Commission] [decimal](18, 0) NULL ,
[CurrencyCode] [varchar] (3) NOT NULL )
I have a foreign key declared as
ALTER TABLE [dbo].[ItemCostings]
ADD CONSTRAINT [FK_ItemCostings_ItemRefsLookUp] FOREIGN KEY ([ItemRef]) REFERENCES [dbo].[ItemRefsLookUp]
([ItemRef]) ON DELETE CASCADE ON UPDATE CASCADE ,
GO
Now I need to design a data entry screen for these two tables using Visual Basic 6.0.
(1) I created a View as follows:
CREATE VIEW dbo.VIEWItemRef
AS
SELECT dbo.ItemRefsLookUp.ItemRef AS ItemRef, dbo.ItemRefsLookUp.ItemDesc, dbo.ItemRefsLookUp.ItemType, dbo.ItemCostings.QuotedPrice, dbo.ItemCostings.SellPrice, dbo.ItemCostings.Commission, dbo.ItemCostings.ProdCost, dbo.ItemCostings.SubsidiaryCode,dbo.ItemCostings.CurrencyCode, dbo.ItemCostings.ItemCostingsID FROM dbo.ItemRefsLookUp INNER JOIN dbo.ItemCostings
ON
dbo.ItemRefsLookUp.ItemRef = dbo.ItemCostings.ItemRef
(2)Created a VB form with a DataGrid control in it with a ADODC control. The View was used as the record source for the Grid and then the ADODC was used as the source for the grid.
(3)Brilliant it does display the data properly allows me delete any rows selected and also allows me to edit the rows whichever I selected to edit.
(4)But when i try to add a new row it comes up with errors asking me to check on the status of each OLEDB.
(5)I have read in this forum that to insert using Views we have to use an Instead Of Insert Trigger.
(6) I did create a trigger in the lines what some freinds suggested as follows:
CREATE TRIGGER UTrig_INS_ItemRef ON [dbo].[ViewItemRef]
INSTEAD OF INSERT
AS
BEGIN
Declare @SubsCode As Varchar(5)
Declare @CurrCode As Varchar(5)
SET NOCOUNT ON
-- Check for duplicate ItemRef in ItemrefsLookup table . If no duplicate, do an insert.
IF (NOT EXISTS (SELECT IR.ItemRef
FROM ItemRefsLookup IR, inserted I
WHERE IR.ItemRef = I.ItemRef))
INSERT INTO ItemRefsLookup
SELECT ItemRef , ItemDesc, Itemtype
FROM inserted
IF (NOT EXISTS (SELECT IC.ItemRef
FROM ItemCostings IC, inserted
WHERE IC.ItemRef = inserted.ItemRef))
INSERT INTO ItemCostings
SELECT ItemCostingsID, ItemRef ,
'100' As SubsidiaryCode,
QuotedPrice, ProdCost, SellPrice, Commission ,
'HKD' As CurrencyCode
FROM inserted
END
(7)This trigger works fine when I directly try to do an insert using the Query Analyser. But it still wont work via the data grid.
I am really stuck and would appreciate if someone can help please. If you have different approach to design this data entry please do advice. Its only very recently I started using Stored procedures and triggers etc. So please ber with my ignorance.
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.
Please Help By Ammending This Code
Hi
please read the following code of RealAudio control :
Private Sub Command1_Click
With Me.RealAudio1
.Sourse = "Song1.ra"
.DoPlay
.Sourse = "Song5.ra"
.DoPlay
.Sourse = "Song6.ra"
.DoPlay
End With
End Sub
by clicking Command1, the ReakAudio1 jumps and plays Song6.ra (the last one) only and it ignore the previous two (Song1 , Song5) .
I think it needs ammendment for this code to play Song1 then Song5 then Song6
I want it to play the 3 songs one after one like a RealPlayer playlist.
May someone help me to fix and show what is missing in this code !
Thanx in Advance
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
Need Help Ammending Form And Code
Hi all,
please find attached my form, my question is:
on my current form i have a list box and txt box that displays user names and scores, the txt box then calculates the average score (based on 4 people). How do i remove the list and txt box completely and have the output i.e. names, scores and average score displayed in a picture box only.
I hope this makes sense
Thank you for you time
Kind regards
Kia.
Saving Data With Code Or With Bound Objects ?
Hi,
I'm just starting out in Visual Basic, having used Access to develop small DB apps in the past.
I've been spending a lot of time in this forum over the last few days and have a few questions...
When saving information from a form, is it better to do it by code with something like rs.addNew,....,rs.Update or is it better to use bound data objects ?
In Access, I'm used to simply dropping the fields from the field list and saving it directly with a docmd.save...
Would anyone have any recommendations (posts, sites, books,...) on tips for people switching over from Access ?
Thanks for the help,
Pharkas
How To Show Data From A Grid In Boxes In EVB?
Wrong section, it's an EVB Question...
This is probably a very basic question but I've spent hours trying to figure it out. I have a form connecting to a CDB on my device. I am able to populate a GridCtrl with all my clients in the form. What I want though is when I highlight or double click on one of those clients I wannt to be able to break up that information into different boxes, which I assume would be TextBox, ListBox or Labels. I've spent hours trying to figure this one out.
Can anyone give me some input?
Edited by - TorontoGuy on 2/22/2004 6:55:18 AM
Show Data In Data Grid Using Adodb
I want to display data in Data Grid using Adodb
------------------------------------------------------------
Private Sub Command1_Click()
Dim oRs As new ADODB.Recordset
con = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " + App.Path + "/Northwind.mdb"
oRs.Open "select * from customers", con, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = oRs
DataGrid1.Refresh
End Sub
------------------------------------------------------------
No error when it is run , but the Data Grid is still empty... still no data displayed.
What's wrong with my code ?
How To Show The Grid Of My Data Sheet In Macro?
Hello, Everyone: Good Morning!
After some copy and paste operations, my data has no any grid while other blank areas has. Would you somebody to let me know how I let the grid showing in my data sheet area using a small Macro program?Thanks.
Charlie
True DBGrid! Making Data Show Up In Your Grid From Access
I have several text boxes in my VB project. Which when you run the project you can add details to the database.
Am trying to retrieve data from that database so it will display in my True DBGrid at the bottom of the screen but am not having any joy what so ever.
Also am trying to get it to do is when I type the first letter of any name i.e. a it will list all the A’s. So if I type an it will narrow it down to all the an and soon on.
Please Help!
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
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 Bound Field Calculation And Restrict Decimal Places While Calculation In Code
Hi
I am working on a VB6 Windows application.
There are a lot of (40) numeric fields, the values for which I calculate in code but are not saved in database.
So is it possible to get the values calculated in a view (view could be reused in reports) while binding data. The values need to be recalculated in code on change of some other fields. So, what is a better approach. As we can't update the Bound textboxes in code, if the DataField property of the textbox is set, because the views are not updatable. Is there any better way of designing this.
Another Question is that i have the formula something like this for calculation:
txtTax.Text = txtCost.Text * Rate1/100
txtTotalAmt.text = txtCost.Text * rate2/100 + txtTax.Text
So the calculated value of Tax contains lot of decimal places. But i would like to have a precision of two decimal places, when its added to 2nd formula to calculate total amount. All the COnversion functions like Cdec, CSng , CDbl return lot of decimal places. So right now, i'm just formatting the tax value to
two decimal places and then adding to 2nd formula as shown below:
txtTax.Text = Format(txtTax.Text, "Fixed")
txtTotalAmt.text = format (txtCost.Text * rate2/100 + txtTax.Text,"Fixed")
Is this the right way for calculation or is there any other way of calculating to right precision?
Because using this method , if i'm again adding Total Amt with another similarly calculated value as shown below, it just appends them as string. eg. 100.00200.00
txtTotalAmt3.text = txtTotalAmt1.text + txtTotalAmt1.Text
So i used Val function:
txtTotalAmt3.text = val(txtTotalAmt1.text )+ val(txtTotalAmt1.Text ), which doesn't seems to be a good
approach.
Please help.
Thanks
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
VB Code To Show Data Sort Window
Hi,
I've got a semi-complicated spreadsheet with a series of complex formulae hidden to the far right of the data entry side of the first sheet.
In order to prevent these formlulae from being damaged, all cells within the spreadsheet are set as protected, except where data is to be keyed.
As I'm using Excel 2000, the problem that arises as a result is that the data can only be sorted if the protection is turned off, hence providing the capacity to damage the aforementioned formulae.
What I'm wanting to do to side-step this problem is add a button, which has VB code attached to:-
1. Turn off the protection;
2. Select only the necessary cells to sort;
3. Show the standard Data Sort window;
4. Wait for the user to select the sort criteria and execute;
5. Sort data;
6. Re-protect sheet.
I would be very greatful if someone could tell me the code necessary for parts 3-5, if it possible. If not, I'll have to create my own Data Sort window, and re-write the code for each of the possible sort criteria.
Thanks,
Rob.
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
Require The Code For Data Grid Fields Protection
Deal All
Need some help
I have created the data grid control and bounded by the recordset onthe form , the data grid is displaying all the data , now i want to
protect two coloums of the data grid which should not be updateablerest fields should be updatable , So plase send me the code for thesame problem
Regards
Dk Varshney
Accenture IT -Indorama Pithampur
Sample Source Code For Creating Search/lookup That Will Display In A VB6 Data Grid
Hi, I am a new member..can anyone help with my problem?
At present , I am developing a database system and right now I a creating a lookup or search where a user can search for a nam of a client and its data will display in VB6 data grid and dont knwo how am I going to do that coz its my first time to us the data grid...is there anyone can help me with my problem hope you cud give me some examples..Thank you and God Bless.
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
Ammending Random Access Record Problems
Basically what i want to do is open a single record in a file, recall it into text boxes and edit it.
Then by clicking on a command button write over the data in the file. please help me!!
the code below is as far as i have got. and even that doesn't get the data and show it in the text boxes. all help appreciated.
thanks.
Private Sub cmdOpenAm_Click()
Dim numrec, recnum As Integer
Open "compgrp3.dat" For Random As #1 Len = Len(sturec)
Let nname1 = InputBox("key in name")
Call Hashing_function
List9.AddItem CStr(recpos)
Get #1, recpos, sturec
Text1.text sturec.Name
Text2.text sturec.TGrp
Text3.text sturec.Sub1
Text4.text sturec.Sub2
Text5.text sturec.Sub3
Text6.text sturec.Sub4
Text7.text sturec.Sub5
Text8.text sturec.Sub6
Close #1
End Sub
Outlook VBA - Ammending Subject/popup Boxes
Im trying to write a macro for outlook 2003. the intention is to try and Make the subject bold and noticeable in any other way, wether thats making the text brightly coloured, highlighting the subject, bolding the subject or having elephants dance around it when it arrives in the users outlook 03 inbox. how can I do this, at the moment I havent got a foggiest, any help with this and general VBA text formatting codes would be greatly appreciated.
JayCR
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
How To Show Rownumber In Grid
Hi
I am using VB6 and ADO.
We are showing the Records from the given SQL Query and the results are shown in the Grid. (We are using Ultragrid from Infragistics). We assign the Recordset to the Grid Datasource and the Data is populated in the Grid.
I want to Show the Serial Number in the first column (like 1,2,3, etc.,). I cannot use rownum in the select itself, because if we use order by clause then we will not get the serial number in correct order.
Is there any method to do this.
Thanks in advance
Regards
Murali
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?
Bound Data Report
Hi all,
My disaster of the day (besides being a newb) is a data report that is bound to a data env. This part works fine.. master records.. detail records.. ect. I am trying to add data from a non related table that consists of a global "due date" etc. that I don't want to make static (would like to use the program next year) and didn't want to include in the master/detail tables since it is the same for all records. Managed to struggle my way thru this far, but stumped at the moment.
Your expertise appreciated
Howard
Data-bound Objects
Hi All... a question please.
I have built a database in Access to store Employee information. The Visual Basic form I have designed to populate / view the database records includes text boxes and a combo box.
The combo box is used to ented / display an employees pay frequency (weekly / monthly etc) and I have used the combo box's List property to 'store' legal responses.
By binding the form's objects to the database, I can add new enteries, but when I try to call-up records from the database, I get a 'text property is read only' error from the combo box.
Can someone please tell me how to get around this ?
Thanks.
Deane
|