ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am going to need to read each line one at a time. One the first time around 1006 needs to go into "its text box" and so on. From there I need to query based on line 1's data and print to datagrid. Then I need to read line two and clear 1006 from the text box and put in 1007 and so on and then query for this set of data and append it to the data grid at the end of the data from the first line.
I am working on an application in which I am going to need to append data to a data grid. Basically, I am going to have a loop that will read a text box, query for info in text box, print to data grid, change info in text box, query and print again and so on. I will need the first set of data displayed, then the next set appended to the previous set at the end, etc, etc. Can anyone help me with how to do this?
I tried something like this and got an Ora - 01722: Invalid Name the second time through the loop on the bolded line.
Private Sub butReadFromtextfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butReadFromtextfile.Click
Dim mLine As String
Dim oFile As System.IO.File
Dim oRead As System.IO.StreamReader
oRead = oFile.OpenText("C:\Documents and Settings\alogue\Desktop\Coil PDI\PDI.txt")
While oRead.Peek <> -1
mLine = oRead.ReadLine()
'Get and split line details
Dim mControlInfo(4) As String 'Sets up the 3 elements on the current line
mControlInfo = mLine.Split(",") 'Tab between the quotes - i used commas, much easier
Dim coilpdi As String
Dim CoilPDIRowCount As Integer
Dim PDIDataset As New DataSet
Dim myConnection As New OracleConnection("Data Source=DUF_TCM; User ID=PCC;Password=DUFERCO")
'Queries for the rolls that match the specified pdi
coilpdi = "Select * from tcm_planned_coil where process_status = 'PLN' and grade_code ='" + txtgradecode.Text + "' and width = '" + txtwidth.Text + "' and hot_band_gauge='" + txthbgauge.Text + "' and target_gauge='" + txttargetgauge.Text + "' order by schedule_number, sequence_number"
Dim PDICommand As New OracleCommand(coilpdi, myConnection)
Dim PDIAdapter As New OracleDataAdapter(PDICommand)
'clears the dataset
'using the command object, open a data adapter
PDIAdapter.SelectCommand = PDICommand
'Fills the data adapter with the dataset
.DataSource = PDIDataset 'display the data in the datagrid
.NavigateTo(0, -1) 'expand the datagrid one level
.NavigateTo(0, "Table2") 'expand the datagrid down to the child level to show query results
.ParentRowsVisible = False
.AllowSorting = True
.AllowNavigation = True
.AllowDrop = False
.ColumnHeadersVisible = True
.PreferredColumnWidth = 300 'Set in pixels
.TabStop = False
.Enabled = True
.Visible = True
.ReadOnly = True
.AlternatingBackColor = System.Drawing.Color.Bisque
CoilPDIRowCount = PDIDataset.Tables("Table2").Rows.Count
AddCellFormattingColumnStyles(Me.dgQueryResults, New FormatCellEventHandler(AddressOf FormatGridCells)) ' This is a private Sub within this class.
Catch ex As Exception
Does this look like it will append data or just write over the first set? I have google appending data to a datagrid and data views alot and havent found any useful ino yet.