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 .
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 .
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Pulling Small Subset Of Data From Large Source In Sorted Order.
Im having a large performance problem and I need to rewrite a very important part of my front end.
Heres my problem.
I pull a set of data... say the top 50 records of a 500,000 record table. once the user scrolls through that top 50 via a listview control it re-polls the database to get the NEXT 50 records... (should the user decide then to go back UP the program queiries again for the 50 records before the current 50)
What I do when I have these chunks of data is just completley reload the list view and highlight the first or last record (Depending on what direction the user is "Scrolling"
THe problem is the dataset has to be sorted by whatever criteria the user has selected... SO.. what I do is simple (Yet horribly slow)
I do the query based on the sort, then I put that data into a temp table so I can have the id of the record. so I can mathmaticly sort through that.
I.E. if I had a table with 10 records numbered 1..10 but sorted on say last name It could not go in numerical order.
UserID | Name | LName
1 | John | Williams
2 | Jessica | Bryan
3 | Bethany | Jackson
So the sort could be... by last name the ID's would be in 2,3,1 or by first name 3,2,1 or by ID 1,2,3 or whatever.
So what my temp table does is provide me a reference point that I can say..
Give me the top 20 records where the TEMPTable ID is less than... whatever. and that gives me the results.
But like I said it is horribly horribly slow as every time it does this it has to sort a 500,000 record table.. put it in the temp table (Even though I only use a created identy column and the PK identity from the source table) and THEN pull the data for ID whatever to whatever.
Is there a simpler way and MUCH MUCH more efficient way to do this? I tried throwing ram at the SQL server (It now has 4 gigs in it) but that didnt even seem to help in the least.
I'm pretty desperate here.
Import Data From A Text File Into VB Form In Order To Process That Data
I'm trying to import Data from a text file, which includes the following,
The above file is updated every five minutes and I wish to retreive this data in order to perform calc's and then display a completion time for a process on the User Form.
Can you please help.
Data Bound Grid
How to retrive data using data grid ?
I am using ADO to access to the Access database.
Using Data Bound Grid
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.
DAta Grid Using Adodc Control Doesn't Display Sorted Record Why?
Please Help me any coding suggestions...I have a datagrid using AdodcControl as a datasource cant display sorted record but instead the record is jumbled every time I load the form...I have tried using an SQL statement with Order BY [FIELD] ASC but still it wont work...Please can somebody help me about this problem...Thanks...
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.
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!!
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
Set rs = Nothing
Set rs = New ADODB.Recordset
rs.Open SQLContact, cn
DBGrid.ApproxCount = a
'enters into a particular place of the grid
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
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
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,
J & P (O) Ltd,
Data Grid Bound To A SQl Server View
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 ,
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
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
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
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
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
(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... =(
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.
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
Order By Date(text Data Type In Access Mdb) Is Not In Proper Order
I am using crystal reports 9 with vb6 and the db is ms-access 2002.
I am just adding the "tbltime" table to display all the fields in the crystal reports.
In the "tbltime" table a column called logdate which is of text datatype in the database.
when i view it in the report the result is not in the proper order but in the database table it is in the ascending order.
logdate in TblTime in dd/mm/yyyy format:
when i view in the reports the logdate field is displaying like this.....
what to do now?
Order A Data Grid
I have a grid data that is data source is a adodc
I see that the access file is order but the grid isn't
Do you have a advice how to fix and the grid data will be order
2D Array's To Copy Data In Order
I'm currently writing some VB code that will take some information from a report (dumped down from DB software) and, depending on certain criteria, paste it to a new sheet with the the Excel workbook.
The report lists all deadlines within a pre-defined range, for outstanding payments owed to the company. I need to copy all instances that have a due date PRIOR to today's date. The instances should be pastes as such:-
Due within 0-2 weeks, but a letter requesting payment has not been sent out for
Due within 2 or more weeks, but a letter requesting payment has not been sent out for
Due within 0 or more weeks, but that a letter requesting payment HAS been sent for.
Would a suitable way to execute this code, be to loop through each row the of the report. Use if-statements to search for the date criteria and letter sent boolean being fulfilled and, for each particular scenario, copy each cell in the row at hand into a corresponding row in a 2D array. That way three 2D arrays would be used:-
Array LessThanTwoWeeks   As String
Array MoreThanTwoWeeks   As String
Array RequestAlreadySent   As String
The data in the "LessThanTwoWeeks" array can be pasted into the new sheet first (it takes presedence), followed by "MoreThanTwoWeeks" and "RequestAlreadySent" last of all.
Would all work?
Data Grid With Text File
From a text file i am displaying records in a data grid. I do not have any delimiters in the text file. I am doing it thru UDT.
Now after displaying if i update any records in the grid , then the same must be saved to the same text file.
how can i do it ? it is unbound data grid.
can u help me
Copy The Data From Text File
I have this code to copy the data from text file to List box to our program , it's working fine
but I want to apply that to text box not to List box
I tried to change the List box to text box and change the name form the code to txt but still there is some wrongs
Please advice me
How Do I Get The ListView Sorted Order After Sorting?
I have a fully functional ListView, automatically sorted numerically (thus, I've been able to solve a couple of common problems all by myself). But the sort appears to be only on-screen -- the indexes for the items are unchanged.
How can the rest of my program determine the sorted order? Or, how can I transfer the sorted data back to an array in the displayed order?
My hope was to use the ListView sort function as my sorting mechanism, avoiding the need to write a separate sort subroutine...
Saving Grid Data To A Tab Delimited Text File?
I have created a form that has 3 frames, one contains a combobox from which a user can select an item. Then a textbox appears in the next frame and the user can enter data. The third frame has a grid inside it in which the data will be stored.
I am having two issues, the first is that when the user picks an item from the combobox, I tried to insert a combobox.listindex control to later use as the index for the column in the grid in which the data will be placed (I used a variable to do this, the textmatrix control needs an As Long variable, so I don't know how to store the list index, can it be stored As Long as well, or does it need to be converted?). ( i.e. - if they select item A it will enter cell 1,1 If they select B it will enter cell 1,2 ) to do this I used the
gridctrl1.textmatrix (1,i) =textbox.text
However the data always gets entered into the first cell of the row?
Second question, once I have the grid populated I would like to save it to a file, perhaps a txt file that can be easily imported into Excel.
I am sorry that I don't have the code for this right now, it is on my comp at home. Hopefully someone can help, if the code would be useful let me know and I will upload it. Thanks for all your help.
Edited by - dochoot on 6/24/2003 4:01:34 PM
Copy Grid Data From One Grid To Another.
I need some help here. I have two grid Parent and child. I have a column in Parent grid called total Qty. What I want to do is on the form load event and Parent grid click event, i want to populate the child grid from the values of parent grid. I need to keep in mind totlal QTY, and divide that Qty by a standard number and show multiple rows in child.
So for one parent I will have coulple of child.
Here is example.
Parent has Total Qty = 60
My standard# = 12
So Total Child Rows = 60/12 = 5 rows in child grid
I need to copy same data 5 times with qty Row like 12,12,12,12,12..
Can someone please help.
Query To Assign An Incremental # Based On Order Sorted
For MS Access
is there a function that exists or can someone build me one, so that i can assign an incremental number to a record based on the order that the records are sorted. such that the 1st record would be 1, 2nd=2, 3rd=3, etc.
Solved through another forum C&P from that forum - it uses the Rank Fxn
SELECT Count(*) AS RNK, A.PRODUCT_NUM, A.INVOICE_DT, A.CUST_NAME, A.CUST_SHIP_TO_CITY
FROM yourTable As A, yourTable As B
WHERE Format(A.PRODUCT_NUM,'0000') & Format(A.INVOICE_DT,'yyyymmdd') & A.CUST_NAME & A.CUST_SHIP_TO_CITY >= Format(B.PRODUCT_NUM,'0000') & Format(B.INVOICE_DT,'yyyymmdd') & B.CUST_NAME & B.CUST_SHIP_TO_CITY
GROUP BY A.PRODUCT_NUM, A.INVOICE_DT, A.CUST_NAME, A.CUST_SHIP_TO_CITY
Read A Text File And Copy Data To Excel In New Column
I am trying to read a text file every half hour named Datacap.txt. It has 12 numbers all in a row in it. I would like to read that data and copy to a new column in a excel file named DC.xls every time I would run a batch file program. Could anyone help me on this? Thank you.
Data Bound Text Box
In "Visual Basic 4 Application", which property of TextBox I need to useto bound it to ADODC control.
Any help will be greatly appreciated.
Clearing An ADO Data Bound Text Box
I have a textbox on a form connected to an adodc data control, which in turn is connected to a query in an Access database.
Occasionally I don't want to display the data from the database in this text box, but just want to clear it instead.
If I simply try:
txtTextBox.Text = ""
Then I get the error message:
"Field not updatable, Bound Property Name: Text, Field Name: tenancyId"
I assume this is because the query is complicated and doesn't support writing back to the database. This isn't what I wanted anyway, so I'm glad it didn't work
Next I tried the following:
If bClear then
Set txtTextBox.DataSource = Nothing
txtTextBox.Text = ""
Set txtTextBox.DataSource = adodcDataControl
Where the latter assignment restores the original behavour of the textbox by assigning it's DataSource back to the adodc data control.
This seemed to work at first, but then after navigating through the records for a bit I got the same error message as before.
I stepped through the code and put a watch on txtTextBox.DataSource. At first everything was okay. Before the line "Set txtTextBox.DataSource = Nothing", the value of DataSource was "<No Variables>" and the type was "Adodc". After the line, the value of DataSource was "Nothing" and the type was "<Unsupported object type>".
However, the 4th time the textbox was cleared (always the same number), the line "Set txtTextBox.DataSource = Nothing" had no effect. The value of DataSource remained as "<No variables>" and I got the error message
I've since tried setting txtTextBox.DataField to an empty string and toying with the DataChanged property, all to no effect. At one point I settled for setting the font colour to the textbox background color when I wanted to clear it, but soon realised the user could see the 'invisible' text if they highlighted it. Disabling the textbox to stop this results in VB/Windows 'graying' out the text and overriding the colour anyway.
Any help for something apparently so simple would be gratefully appeciated!
Or do I have to resort to having an invisble textbox on the form, and switching them around as appropriate...? Please don't tell me I have to do that.
Thanks in advance,
[SORTED]Searching Specific Line In Text File?
I have a text file with about 84 lines of text or so. What i'm trying to do it when someone types 32 in a box then a string is changed to what is on line 32 in the text file.
For example if line 64 is hello, when the user types in line 64 in the textbox then the string MyString will = hello.
I want this to be as easy as possible please. Im currently using
Open App.Path & "worlds.txt" For Input As #1Line Input #1, WLine MsgBox WLineClose #1
But can't seem to edit it to search a specific line.
Thanlks in advance!!
Data Grid - Copy Row
I have a datagrid which has multiple records. When the user selects any row in the grid and clicks a particular button I want that the entire row should be copied and the values in the row should be reflected in the textbox controls under it.
Rich Text Box Formatting When Bound To Data Control
I have a rich text box on my form, it is bound to an ADO Data Control. I can format the text in bold or not bold. The problem is
1. I highlight the text and click the bold button and it makes it bold.
2. With the text still highlighted I click the bold button and the text remains bold and the cursor moves to the first of the rich text box.
3. When I highlight the text again and click the bold button it unbolds and works fine.
I cannot consecutively click the button to bold and unbold text or to bold seperate highlighted text. The code works fine on a regular Rich Text box only when it is used on a bound Rich Text box does it go flakey.
Here is the code I am using in my Toolbar.
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
If IsNull(RichTextBox1.SelBold) = True Or RichTextBox1.SelBold = True Then
' Code to run when selection is mixed.
RichTextBox1.SelBold = False
Toolbar1.Buttons("Bold").Value = tbrUnpressed
ElseIf RichTextBox1.SelBold = False Then
' Code to run when selection is not bold.
RichTextBox1.SelBold = True
Toolbar1.Buttons("Bold").Value = tbrPressed
Bound Dropdown Box Not Updating Bound Text Boxes...
I have an Access 97 form with bound textboxes, and a dropdown combo. The user selects a value in the dropdown to populate the textboxes.
Because there could be duplicates values in the combobox (the values are people's last names), I have made the combo into a multi-column dropdown, adding a first name and a date of birth. It works well, until there are multiple occurrances of the same last name. What happens in that case is only one record displays in the textbox no matter which of the combobox's values is chosen.
For instance, I have a bunch of "Smith" values, and when any of them are selected, the data appearing in the text boxes remains on "Richard Smith"... Furthermore, I checked a few different duplicates other than Smith, and it is inconsistent as to which record is always displayed. Sometimes it's the first in the bunch, sometimes it's the last, etc...
If this helps, here is the Row Source of the dropdown:
SELECT DISTINCTROW [Hospital].[PatLName], [Hospital].[PatFName], [Hospital].[PatDOB] FROM [Hospital] GROUP BY [Hospital].[PatLName], [Hospital].[PatFName], [Hospital].[PatDOB] ORDER BY [Hospital].[PatLName], [Hospital].[PatFName], [Hospital].[PatDOB];
Anyone out there ever run into this before?
MailMerge - MS-Flexie Grid [SORTED]
i am trying to make a mail merge between vb6 and word (i got some example and will be working on them soon)
the problem is that i am planning to use a replacing function (make a word template and then make the program to replace <cAdd> with the clients address and so fort) but i need to add a list of products which the client has purchased, this list is in a grid format in the program but i have no idea on how to transfer the grid contents to the word file since there can be a X amount of products
so how can i transfer a whole grid to word and then print it?
Sorted ..... Combining A Textbox And A Grid?
How can I combine a textbox and a grid? I have a database of customers, i.e. Customer_Name; Address1; Address2; Address3; etc. which are displayed in the grid. There may be 10 Customers of the same name but all have different addresses. What I want to be able to do is allow the customer to enter the first letter of the name in the textbox and the grid scrolls to the associated letter, if the user enters the first 2 letters of the name the grid scrolls to the associated name, etc. Much the same as a combobox.
Isometric Grid Sorted - One Small Problem
Using help from examples on this site and others ive finally got my isometric map editor working. I just figured out the major problem was registering the coordinates in the grid which the mouse clicked. With that sorted i discovered a problem - im not sure of its extremity because im not sure how hard it is to fix. My grid is set out like this:
Now (0,0) shood be here: |
.............................../..................Instead, the x is back to front. (0,0) is
............................/........................at the left corner. X basicly just
............................................./......starts its 'coordinate count' from the
(dots are for formatting)
Here is the code that determines where to place each tile according to its coordinates - mind you, in the coordinates, (0,0) IS the top corner
xpos = ((Form1.Width) / 30) - (Universe.MapX * 36) + ((Universe.MapY - 1) * 36 + (a * 36) + (b * 36))
ypos = (Form1.Height / 30) - ((Universe.MapY - 1) * 18) - (Universe.MapX * 18) + (b * 18) - (a * 18)
'xpos and ypos are where the uppermost left corner of each tile is pasted
'my tiles are 72X32, hence the 36s and 18s
'MapX and MapY indicate what part of the map is currently on the screen
I think this is all of the code you need. I admit that i myself dont fully understand the code there, i took it from a tutorial and modified it to my needs. Each tile fits perfectly, everythings perfect.. except for the inverted x. Any help would be apreciated. Thanks
Showing 2 Tables In A Single Grid.(sorted)
i've 2 tables and both the tables have a date field. i want to show the rows from both the tables in a single grid sorted according to the date. what is the easiest way to do this( i'll be happy if some sql statement can be used.)
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.
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
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?
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?
Sorting A Data File In Ascending Order
I need to sort a data file by a 2 character field in ascending order. The only info I could find on sorting is how to sort an array. Does anyone know the command I need to use? Any help would be greatly appreciated.