Please help me how to add the blue color text to datagridview here is my code:
Dim FileLine As String
Dim LineLength As Integer
Using sr As New StreamReader("C:\Users\WIN 7\Desktop\rmsbp050_09032018.txt")
While Not sr.EndOfStream
FileLine = sr.ReadLine()
LineLength = FileLine.Length
If LineLength = 59 Then
DataGridView1.Rows.Add(FileLine.ToString, sr.ReadLine() & vbNewLine, sr.ReadLine() & vbNewLine & vbNewLine, sr.ReadLine() & vbNewLine & vbNewLine & vbNewLine)
Here is the sample text file :
BANK NAME 15 CUSTOMER INFORMATION SYSTEM *RMR100 * PAGE NO 1
CTL 2 000 PNB SAVINGS BANK MONDAY PROCESS DATE 09/03/18
CTL 3 000 ACTIVITY *RM 100* PROCESS THRU 09/03/18
CTL 4 0000 CURRENT DATE 09/03/18
BRANCH 0000 - PNB SAVNGS BANK
CUSTOMER NAME CUSTOMER NBR CUSTOMER INITIATED?
TRAN DATE TIME FIELD DESCRIPTION ACT TRAN ID AFTER
EMPLOYEE TERMINAL LST MNT DATE LST MNT TIME BEFORE
CO, CARLOS VERA 00000004676090 N
09/03/18 10:21:42 RESP BR MNT RM1P 0000
15-000-1027993 B112 03/29/2017 02:16:23
- Using -
Visual Studio 2017(15.8.7)
MySQL for VS 2.05
MySQL Connector .net 6.9.9
I apparently made a grave mistake of running some recommended updates on the Nuget Manager and now I am unable to successfully set up any datasource to my MySQL DB(v8.0.12). I've even tried using(MySQL for VS 1.2.7 with Connector 6.9.8) as well with no luck and Installing MySQL.Data from Nuget with various versions and still no go! There is obviously something I'm missing or something extra is there that may be conflicting but I am not sure what it is.
My question simply is: Can anyone give me a step by step on what configuration i need along with Visual Studio, MySQL for VS, MySQL Connector .net(if necessary), MySQL.Data etc so I can successfully set up and use a SQL DATASOURCE with a MySQL(v8.0.12) Database(or is it possible)?
Any help is greatly appreciated
I was able to solve my issue using this method(commands):
set global optimizer_switch='derived_merge=off';
However I'm still wonder how I will be able to use MySQL for VS(8.0.12)/connector.net(8.0.12) combination to be up to date?
Anyway, for now I am reluctant to try and upgrade those 2 until there is a working solution for me.
I'm frustrated. I want to learn how to create a file to store information like name, age, phone number, email, etc... in VB.Net I have tried google, youtube, books but cant find what I need. I want to be able to write code that would save my data and so I can retrieve it later in the program. I'm willing to pay someone if they can tell me how to do it. Thanks.
I am in agreement with Victor
Using a database like(MySQL or SQL Server) is the best way to go.
MySQL sets up faster and is lighter.
Steps you would take will be:
-install the Database server
-create the table with the fields you want to store (name, age, etc.)
-Save(Name) the table how you want (example: give the table the name "PersonInfo")
-create a new Asp.Net Web Application Project in Visual Studio
-use a web form in your project
-From the Toolbox Menu search for "GridView"(it's easier to use as a beginner with data) then drag onto your web form.
-you will have to click the right arrow and set up your datasource (which includes the connection credentials-user name-password you already set in MySQL or whichever database you use).
I don't know what is wrong with this code. Keep getting error messages as follows:
bc30026 End sub expected
bc30289 Statement cannot appear within a method body. End of method assumed.
bc42024 unused local variable: 'position'.
bc42109 Variable 'temp' is used before it has been assigned a value.
any help would be appreciated. Thanks
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim position As Integer
Dim id As Integer
Dim name As String
Dim surname As String
Private Function FindLastRecordNo()
Dim temp As person, FileNumber As Integer
FileNumber = FreeFile()
FileOpen(FileNumber, TextBox1.Text, OpenMode.Random, _OpenAccess.Read,, Len(temp))
FindLastRecordNo = 1
Do While Not EOF(FileNumber)
FileGet(FileNumber, temp, )
FindLastRecordNo = FindLastRecordNo + 1
I am a 100% online student trying to learn C#. My instructor has not been of help, so I am looking for help elsewhere.
My homework is to create a program that will convert measurements:
In the English measurement system, 1 yard equals 3 feet and 1 foot equals 12 inches. Use this information to create an application that lets the user convert distances to and from inches, feet, and yards. Use list boxes for the user to select units being converted from and another list box for the user to select units being converted from.
Write your code in the following order
Program must check for correct input into the textbox. Hint: use TryParse.
Check that user has selected a from unit. If not, let user know no unit has been selected.
Check that user has selected a to unit. If user selects the same unit for both from and to, let them know that they need to select a different unit.
I believe I have my TryParse correct. It will make sure a measurement has been entered, a from distance has been selected and a to distance has been selected. After that, I am not sure where to proceed. I don't know how to grab what is selected in the from groupbox to the to groupbox and then convert. Any help would be appreciated. Thanks!
publicpartialclass Form1 : Form
privatevoid convertButton_Click(object sender, EventArgs e)
if (double.TryParse(distanceTextBox.Text, out distanceInput));
if (fromListBox.SelectedIndex != -1)
if (toListBox.SelectedItem = != -1)