473,796 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error message!!!!

34 New Member
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\Lo cal\Temporary\p rojects\Windows Application1\Fo rm1.vb 59 33 WindowsApplicat ion1
2. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 60 45 WindowsApplicat ion1
3. Name 'oLaon' is not declared. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 61 25 WindowsApplicat ion1
4. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 61 43 WindowsApplicat ion1
5. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 62 44 WindowsApplicat ion1
6. Expression expected. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 63 87 WindowsApplicat ion1
7. Syntax error. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 64 25 WindowsApplicat ion1
8. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 94 33 WindowsApplicat ion1
9. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 95 41 WindowsApplicat ion
10. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 96 49 WindowsApplicat ion1
11. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 97 47 WindowsApplicat ion1
12. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 98 48 WindowsApplicat ion1

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 2320
debasisdas
8,127 Recognized Expert Expert
Question moved to .NET forum.
Apr 8 '08 #2
Plater
7,872 Recognized Expert Expert
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
11932
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 what may have happened? 3e68b4c8 SystemErr R us.sc.scstoweb.unclaimedproperty.business.PropertySearch.getLastUpdateDateFromDB()...Exception selecting from UNCLAIMED_PROP Tables (SQL): SELECT TREASURE.UNCLAIMED_PROP.LAST_UPDATE_DATETIME AS...
8
4066
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: DoCmd.SetWarnings False DoCmd.RunCommand acCmdDeleteRecord DoCmd.SetWarnings True End If ExitHere: Me!SubName.SetFocus
3
5837
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. The reason for the error is to prevent an import of a record of which one already exists based on a like item number. I tried various methods of structuring an error handler in the sub, including Select Case, but with no success. I assume that...
7
1720
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
3
5135
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 reinstalled VS.NET; still nothing. Any ideas? Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code...
9
2297
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 browser. What is the issue? Thanks, Jim Server Error in '/psnRequest' Application. ----------------------------------------------------------------------------
8
10016
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 the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
5
6585
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 Environment" with this message: "Error while trying to run project: Unable to start debugging on the web server. Server-side error occurred on sending debug HTTP request. Make sure the server is operating correctly. Verify there are no...
8
13106
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 error message than the default. It works in every situation except when the user clicks the close button. I am using Me.Dirty=False to force a save but if there are duplicates I just get the standard Runtime 3022 error message. I am wondering...
1
2287
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 error was returned without an error message Anyone know what its about ? Thanks !!
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9047
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.