473,385 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error message!!!!

I've been trying to clear these error messages that I keep getting, was wondering if someone could help me out here.

1. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Local\Temporary\projects\WindowsAppli cation1\Form1.vb 59 33 WindowsApplication1
2. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 60 45 WindowsApplication1
3. Name 'oLaon' is not declared. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 61 25 WindowsApplication1
4. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 61 43 WindowsApplication1
5. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 62 44 WindowsApplication1
6. Expression expected. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 63 87 WindowsApplication1
7. Syntax error. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 64 25 WindowsApplication1
8. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 94 33 WindowsApplication1
9. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 95 41 WindowsApplication
10. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 96 49 WindowsApplication1
11. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.VisualBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.VisualBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 97 47 WindowsApplication1
12. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 98 48 WindowsApplication1

Expand|Select|Wrap|Line Numbers
  1. Imports System.IO
  2. Imports System.Text
  3. Public Class Loan
  4.     Dim iTerm As Integer
  5.     Dim decRate As Decimal
  6.     Dim strDesc As String
  7.     Dim strLoanId As String
  8.     Public Property Term() As Integer
  9.         Get
  10.             Return iTerm
  11.         End Get
  12.         Set(ByVal value As Integer)
  13.             iTerm = value
  14.         End Set
  15.     End Property
  16.     Public Property iRate() As Decimal
  17.         Get
  18.             Return decRate
  19.         End Get
  20.         Set(ByVal value As Decimal)
  21.             decRate = value
  22.         End Set
  23.     End Property
  24.     Public Property Desc() As Integer
  25.         Get
  26.             Return strDesc
  27.         End Get
  28.         Set(ByVal value As Integer)
  29.             iTerm = value
  30.         End Set
  31.     End Property
  32.     Private Property LoanId() As Integer
  33.         Get
  34.             Return strLoanId
  35.         End Get
  36.         Set(ByVal value As Integer)
  37.             iTerm = value
  38.         End Set
  39.     End Property
  40.     Public Shared Function SelectLoanList() As ArrayList
  41.         Dim loanlist As New ArrayList()
  42.         Dim sr As StreamReader
  43.         Dim sPath As String
  44.         Dim sLine As String
  45.         Dim aLine As String
  46.         Try
  47. #If DEBUG Then
  48.             sPath = Microsoft.VisualBasic.Left(Application.StartupPath, Len(Application.StartupPath) - 9)
  49. #Else
  50.             sPath = Microsoft.VisualBasic.Left(Application.StartupPath, Len(Application.StartupPath) - 11)
  51. #End If
  52.             sPath = sPath & "loans1.txt"
  53.             sr = New StreamReader(sPath)
  54.             If Not IsNothing(sr) Then
  55.                 Do
  56.                     sLine = sr.ReadLine()
  57.                     If Not IsNothing(sLine) Then
  58.                         Dim oLoan As New Loan()
  59.                         aLine = sLine.Split(",")
  60.                         oLoan.LoanId = CInt(aLine(0))
  61.                         oLaon.Term = CInt(aLine(1))
  62.                         oLoan.iRate = CDec(aLine(2))
  63.                         oLoan.Desc = "Loan Amount" & oLoan.LoanId & ": " & oLoan.Term &
  64.                         "Yrs @" & oLoan.iRate & "%"
  65.                         loanlist.Add(oLoan)
  66.  
  67.                     End If
  68.                 Loop
  69.             End If
  70.         Catch ex As Exception
  71.             Throw
  72.         End Try
  73.         Return loanlist
  74.     End Function
  75.     Public Shared Function SelectLoan(ByVal iLoan As Integer) As Loan
  76.         Dim oloan As New Loan()
  77.         Dim sr As StreamReader
  78.         Dim sPath As String
  79.         Dim sLine As String
  80.         Dim aLine As String
  81.         Dim strLoan As New StringBuilder()
  82.         Try
  83. #If DEBUG Then
  84.             sPath = Microsoft.VisualBasic.Left(Application.StartupPath, Len(Application.StartupPath) - 9)
  85. #Else
  86.             sPath = Microsoft.VisualBasic.Left(Application.StartupPath, Len(Application.StartupPath) - 11)
  87. #End If
  88.             sPath = sPath & "loans1.txt"
  89.             sr = New StreamReader(sPath)
  90.             If Not IsNothing(sr) Then
  91.                 Do
  92.                     sLine = sr.ReadLine()
  93.                     If Not IsNothing(sLine) Then
  94.                         aLine = sLine.Split(",")
  95.                         If iLoan = CInt(aLine(0)) Then
  96.                             oloan.LoanId = CInt(aLine(0))
  97.                             oloan.Term = CInt(aLine(1))
  98.                             oloan.iRate = CDec(aLine(2))
  99.  
  100.                             strLoan.Append("Loan ")
  101.                             strLoan.Append(oloan.LoanId)
  102.                             strLoan.Append(": ")
  103.                             strLoan.Append(oloan.Term)
  104.                             strLoan.Append("Yrs@ ")
  105.                             strLoan.Append(oloan.iRate)
  106.                             strLoan.Append("% ")
  107.                             oloan.Desc = strLoan.ToString
  108.                         End If
  109.                     End If
  110.                 Loop Until sLine Is Nothing
  111.             End If
  112.         Catch ex As Exception
  113.             Throw
  114.         End Try
  115.         Return oloan
  116.     End Function
  117.  
  118.  
  119.     Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
  120.  
  121.         Try
  122.             ComboBox1.Items.Add("Loan 1: 7 Yrs @ 5.35%")
  123.             ComboBox1.Items.Add("Loan 2: 15 Yrs @ 5.5%")
  124.             ComboBox1.Items.Add("Loan 3: 30 Yrs @ 5.75%")
  125.         Catch ex As Exception
  126.             MsgBox(ex.ToString)
  127.             Console.WriteLine(ex.ToString)
  128.         End Try
  129.     End Sub
  130. End Class
Apr 8 '08 #1
2 2295
debasisdas
8,127 Expert 4TB
Question moved to .NET forum.
Apr 8 '08 #2
Plater
7,872 Expert 4TB
This really seems more like vb classic code then .NET.
Those errors don't sound confusing to me. You are using an integer as a character without correctly casting it (or vice versa) and using variables completely without declaring them.
Sound more like you need a basic tutorial.
Apr 8 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: afreema | last post by:
We have a WebSphere application that quit working this week. It was trying to hit DB2 UDB Version 8 on Linux. The Driver is DB2 V7. This is the message in the WebSphere logs. Does anyone know...
8
by: Steve | last post by:
I have several pairs of synchronized subforms in an application. I have a Delete button for each pair that uses the following code or similar to delete a record in the second subform: ...
3
by: Rolan | last post by:
I seem to be unable to have a custom error message to appear for Error 10011 (database was unable to append all the data to the table). Each time, the MS Access default error message box appears....
7
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- ...
3
by: Robert | last post by:
Every time I navigate to any .aspx file on my computer, I get the error below. According to MSDN this indicates that my CLR is corrupt, but I've re-installed the .NET framework with no help. Also...
9
by: JTrigger | last post by:
When I compile my project using the IDE on a development machine it works just fine. When I compile it on the server using csc.exe, I get the following error when I try to bring it up in the web...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
5
by: Bruce Schechter | last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each time I try to execute the application (which is basically empty so far), I get a dialog box titled "Microsoft Development...
8
by: g_man | last post by:
I am trying trap Runtime error 3022 (duplicates) in the click event of a command button that closes the form. I have code in the Form_Error event that does a good job of providing a more meaningful...
1
by: David Greenberg | last post by:
Hi In my DTS I am updating an Ingres database on a different server. I'm getting the following error immedtiately .... HResult of 0x80040e09 (-2147217911) returned Unexpected error occured. An...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.