SP-J1-B 203101 Black 99.0 28 0 0
SP-J2-B 203102 Black 99.0 28 0 0
SP-J3-B 20303 Black 99.0 28 0 0
SP-J4-B 20377 Black 99.0 28 0 0
SP-J5-B 203104 Black 99.0 28 0 0
i want to change the value of column two with my own value so i split the string like this
Dim FileContents() As String = IO.File.ReadAllLines("C:\switchoutputA.txt")
For Y As Integer = 0 To FileContents.GetUpperBound(0)
Dim blah() As String = FileContents(Y).Split(New String() {" "},
[Code]....
but some times it dont want to remove empty entries and i get blah(1)="" without any value. how to remove the empty entries?
I'm using VB .NET and I know that Union normally works ByRef but in VB, Strings are generally processed as if they were primitive datatypes.Consequently, here's the problem:
Sub Main() Dim firstFile, secondFile As String(), resultingFile As New StringBuilder firstFile = My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.Desktop & "1.txt").Split(vbNewLine) secondFile = My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.Desktop & "2.txt").Split(vbNewLine)
I don't want the last empty row appear in my DataGridView1. How to get rid of it? Please advise. I am adding data through textboxes. The DataGridview is only to see the data.
I have a program where you have three entries, CD name, artist, price and it goes into a listbox and .txt file when closing. I have to have a message box if you enter the same CD name. I have a code to open the .txt file and compare strings but I need to change it to compare only the CD name and not all three entries. Is there a way to do my string compare against my listbox without opening the .txt file?? The program loads the listbox from the .txt file when opening. Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click' adds CD information to the list box
' declare variables Dim strName As String Dim strArtist As String Dim strPrice As String
I am developing an app which has a TabControl and Several TabPages. However when I switch the taps to be dislayed on the side I am left with a large amount of empty space. I am unable to move the TabPage to remove the empty space.
I am using TextFieldParser to Read a Tab Delimited Text DataFile. The problem I have is that some times the data file (3rd party provided) contains an extra Tab which therefore creates an extra column. I need to remove this unnecessary column. Some columns will have rows that are empty so I cant just delete the column if it has a blank row, So I think I need to loop through each column and if if every row is blacnk then delete that column.
Here is the code that reads the file, I was going to remove the column from the table called table before I populate the table called dtAll , which is what my program uses Dim safeFileName As String = IO.Path.GetFileName(Me.OpenFileDialog1.FileName) Using myReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(safeFileName) myReader.SetDelimiters(vbTab) Dim currentRow As String() [Code] .....
Ok i have a weird issue. I cant figure out what to use... CSV has two colums :-Name, MobileJohn Doe,60002000Jane Doe,Now i would like to delete the whole line if mobile number is empty.. i cant figure out what to use. Mobile number are 8 digits long.
How can I open a tab delimited text file and remove the columns that are empty and the save it? Empty columns are those that have no value in the first row.
I want to set a certain column to true or false automatically based on what value another column has entered. I managed to get this working by myself using the 'SQL Pane' in VB and testing it by using execute sql but I don't know what to do now. I assumed that I could just save it and it would work from there but that's not the case, it dissapears from the SQL Pane if I close the project (even though it worked fine when I ran the project the first time), so where do I put it/what do I do with it in order to get this to work?
I have a DataGridView that has some columns with dates. It binds to an in-memory Datatable which gets loaded from an string array of data passed back from the backend Some of the rows returned have nulls for the date columns. Solution 1: If I define the Date column in the DataTable as "string" I can easily convert those nulls to empty strings and display it in the grid as empty strings (desired results). However, if the user clicks on the date column header to sort by date, it doesn't order the rows as you want. You get a purely string sort order. Not acceptable
This must've have been asked before but I couldn't locate it. In a mixed code project (VB and C#) we were debugging some old Visual Basic code where a statement as follows could be found:
If Request.Params("xxx") <> "" Then 'do something
I considered this a bug as Request.Params could be null, in which case the statement would've become false which wasn't the idea. So I thought. I just found out, -- probably for the tenth time and I will keep forgetting -- that the following two statements are not equal, while Nothing in VB should be equal to null in C# (thought I):
if(String.Empty == null) // always false If String.Empty = Nothing Then ' always true
Should I dismiss this as a typical Microsoft backward compatibility effort, or should I consider this a huge error in the VB.NET compiler? Does anybody know the Microsoftean opinion on this oddity?
I have an app that I'm calling up a 3rd party API.. and on each call I want to store off the patient data in to logs that are like weekly.. so on each call to the API I want to encrypt the data and push as a line into a file..I kinda dont want to open the file.. add in data then encrypt the whole file, that seems like extra work to me.so if I want to encypt the data from string to byte whats the best way to push into a file and then read out.. should I set the string to be a certain lenght so my writes and reads match up ? or is there a way to write to a data file so that it knows the end of the entry ? should I use a type class for this ?
i am using following code to search my computer for files with certian extensions. I currenty searching for .eml files. I need to enter 10 most current files' path to my list box. How can I do it?
Dim DriveLetter As String = "c:" Dim Ext As String = ".eml"
Just had to remove remove statics and use Delegates refering to class. i have got a little problem in one of my project.I need help to resolve it.My application Connect several FTP server with the same Class.I'm using TCPclient for few specifics Commands.The problem : All threads call the same TCPclient wich can't connect several server at once.I would like to create a New TCPclient for each thread.
I'm trying to remove individual nodes from their parent, I tried the Remove method but it doesn't seem to be working. How is this done? Is this a bug or what?
Sub Main() Dim xml = <?xml version="1.0" encoding="utf-8"?>
I've made a program for a small business that keeps track of what items there are, their prices, and the quantities of those items. I would like to add a button that goes along the lines of "Add to sale" or "Add to cart", and have it select the currently highlighted item in the database grid view to add the price column up, to make a total for a sale.
I have form on VB2008 and Mysql as Database which have 24 textfields on a form.I want to impose certain condition that when ever user adds/updates/modifies data into database for example You may have entered text in a numeric fied or a number that is larger than the fieldsize setting permitts. if violates message box should appear with Invalid entries
I'm trying to create a Treeview that will have around 400 entries and thought I'd import the names from a text file that i'll create from my spreadsheet.
In my following code I'm just using 1 line of text from the text file. The line contains Parent/child level1/child level2/child level3/child level3.text
I'm using the MS example script [URL] to install a COM+ application. For uninstall I have a script that shuts down the app, calls Remove from the Catelog App Collection, and then I call regsvr32 /u. This cleans up the COM entries and removes my app from the catelog but leaves behind the CoClass and Interfaces in HKEY_LOCALSoftwareMicrosoftCom3Selfreg. How should the script remove the SelfReg values?
well with studing i think i can add data to the xml to save it to the forum but i think the problem is when deteleting stuff from the xml file is the error
My first method is trying to get all entries in one of the database tables. However when I try to build the solution this is the error I get:
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">Error 1 Value of type 'String' cannot be converted to '1-dimensional array of String'.[code]....
I want to get the log entries of "Applications and Services LogsMicrosoftWindowsDiagnostics-PerformanceOperational", do not know how to do that. I know how to get System event log:
Dim myEventLog As New EventLog("System", ".", "EventLog") Dim myLogEntryCollection As EventLogEntryCollection = myEventLog.Entries For Each objELE As EventLogEntry In myLogEntryCollection