when i convert date and time string into datetime type using atetime.parse(string) it run ok but when it reach to 4th row it show error, i think because "date" string is not in proper format (dd/mm/yyyy HH:mm:ss) how to eliminate this problem
I need to be able to change a path inside a document ( a config file to a program) to the current directory of the application im creating in VB so the text file looks something like
I am trying to convert some old VB code (EXAMPLE 1) to VB.Net that opens up a text file and loads a text box line by line. I am really looking to replace the existing syntax. Note that I know I can import the whole file using EXAMPLE 2.[code]...
I'm in the final stages of finishing a program I've been working on for nearly a year now, and this is basically my final hurdle. The Save dialogue is working beautifully, with 'flags' in order to switch it over from the regular input into text boxes to the Listbox input protocol.
1.In my program I have 2 textboxes.In first textbox user need to put some number.Let's say he put number 10, then in other textbox program need to write numbers from 1 - 10, like this:
1,2,3,4,5,6,7,8,9,10 If he put 20 in first textbox, in second textbox it should be:
i have an issue with database connection or import of file. i use following settings / methods so far unsucessful. the content in the table calendar is just not being added. how can i find out why this wont work?
I have a table into my database(Paydb) call additionPension. There is a textfile(AdditionPension.txt)on my c: drive. I want to import this text file into the additionpension table in my database.
I have to read a file like this below , when my program reads @name what comes after it, goes to a textbox that is in my form.After the program reads @atributes, it goes in to another textbox and finally, when it reads the period it puts in another textbox.
We had a wierd problem at work.SOmeone at finance tried to import a text file into their system. It complained about the textfile was in unicode format. The file contains scandinavian . Apparently the ERP system that exported the file can only handle unicode.So one of our junior programmers wrote a batch program that line by line converted the unicode file to ascii (you can't choose encoding.ANSI because ANSI is byte array)
The files are rather big, about 3 GB in size.Apparently the system liked ASCII files, but sadly after this processing the and was gone and replaced with ?So, he wrote a new batch program, this time replacing m?nad with m�nad using String.Replace The file was opened using Encoding.Default and saved using Encoding.Ascii.Now the files HAVE AND can be imported. After he explained this to me, I just went . I wish I had some nifty "you should have done this... bla bla its much easier" but I am lost here in the jungle of code pages and encodings. Can someone that has their head screwed on straight enlight us *both* about why we had this problem and how it could be handled without writing the second batch program?
Basically unicode->non unicode (ascii) with the intact. I also noticed that if I use streamreader to read an ansi file with the internal strings will show ? instead.
I am once again working on a project and have hit an absolute wall! Here is what I'm trying to do:
1. Create a Userform that has one textbox and one button.
2. Have the user enter text in the textbox and press enter.
3. Once enter is pressed have the form take the data they typed into the textbox and search a specific .txt file (beginning the search from bottom to top to find the most recent entry) until it finds a match.
4. Take the latitude and longitude to the right of the match and convert them to proper form. Right now my SQL provides live updates to the .txt file only the lat/lon come accross as |-112053440|33427640|, so I need to insert decimals in the correct places.
5. Either way, they type "c123" it will search until it matches that then take the latitude and longitude that is to the right of the match.
6. Convert the latitude/longitude into proper format because if it pulls the data as is it will appear as[urls]...
I have an application with a listview which contains 3 columns (account, password, and a hidden column).
I have written some code to save the contents of the account and password columns in the format Account|Password.
Now I would like to be able to import text files into the listview. I was thinking about reading the text file then splitting it using Split("|") however I don't know how to put the variables in the seperate columns. Here is my code:
Dim accounts As String Dim i As Integer Dim aryTextFile() As String
I need to open a text file, remove lines in the file that contain specific starting characters, and save the file back with a different file name, is this possible? The file contains a header record, detail records, and a trailer record. There are other records that I do not want in the file, this records have a specific starting character. I can open the file in VB, copy to another string variable, but cannot find out how to remove the lines I do not need and save the file.
Is there anyone here who can help me with my problem in importing text file using vb.net and then after the importing, the imported data will be insert in sql server?
I have Converted my code from VB6 to 2008 then I have got the below warning. Warning 1 Variable 'a' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. The code is working but the results in sql server table is wrong due to this error.
CommonDialog1Open.ShowDialog() Dim pathh As String pathh = CommonDialog1Open.FileName If cn.State = 1 Then cn.Close() If rs.State = 1 Then rs.Close() [Code] .....
I have one combobox, two buttons (Add and View) and listbox. When I click button Add text from combobox is added to text file. This is code for Add button:
I am trying to import a text file to an access database in VB2008 express. The text file I am testing with is a csv file with 34,000 records. The problem is this takes 2 minutes to read through all this and write it to the database. The actual text file I will be using in production has over 800,000 records and this will take a ridiculous amount of time. I think I am doing something wrong. I have posted my code below. I am reading a record, parsing out the fields to an array, then creating an SQL statement to insert the record and executing it.
reader = New IO.StreamReader(fname) Do While reader.Peek() >= 0 linesread = linesread + 1