Results 1 to 5 of 5

Thread: In VB.NET, Error: Unable to determine decimal

  1. #1
    Join Date
    Aug 2006
    Posts
    332

    In VB.NET, Error: Unable to determine decimal

    I am trying to make a code in VB.Net but I am getting an error while running that program. I am trying to select a few columns from a dbf. While doing this I am getting an error on a column where we have decimal values stored. The Error : Unable to determine decimal is coming. I think that the problem is the values being stored with a "," to separate the decimals. If someone knows the solution please provide me with that.
    Extremely Thanks in Advance..!!!
    Do not email me asking for tech support. Any private support is billable at $50 an hour.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: In VB.NET, Error: Unable to determine decimal

    It would be better for me to check the exact code of yours and then tell the problem that you are facing. The "Error: Unable to determine decimal" normally comes if you have not declared the decimal properly. Instead of making you more confuse, I would like to tell you that you should provide your code so that I can tell what exact you are missing. Hope that you will post your code soon. Also don't forget to mention where you are getting that error.!!

  3. #3
    Join Date
    Aug 2006
    Posts
    332

    Re: In VB.NET, Error: Unable to determine decimal

    Thanks for paying attention to my problem. Here is my code :
    Code:
    Dim dbfdatabase As String = "kmtab3.DBF"
            Dim connectionString As String = "Provider=VFPOLEDB.1;Data Source=\\Fileserver\iis\calculatiemodule\;"
            Dim ds As New DataSet
            Using connection As New OleDb.OleDbConnection(connectionString)
                Dim da As OleDb.OleDbDataAdapter
                Dim sql As String = "SELECT PLAATSVAN, PLAATSTOT, AFSTAND FROM " & dbfdatabase
                da = New OleDb.OleDbDataAdapter(sql, connection)
                da.Fill(ds, "Afstanden")
            End Using
    System.InvalidOperationException was unhandled
    Message= "The provider could not determine the Decimal value." The Decimal column was not available, and the consumer had not yet set a new Decimal value. Please Help..!!!
    Do not email me asking for tech support. Any private support is billable at $50 an hour.

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: In VB.NET, Error: Unable to determine decimal

    I know the same code for that but in PHP. Hope that you will get some clue from that code. Here is the code in PHP :
    Code:
    for($i=1;$i<=$count;$i++) {
             $row = dbase_get_record_with_names ($nixxer,$i);
    $dossier[$i]=array($row['VOLGNUMMER'], $row['RELATIE'], $row['PLAATSVAN'], $row['PLAATSTOT'], $row['AFSTAND'], $row['D'], $row['F'], $row['A']);

  5. #5
    Join Date
    Nov 2008
    Posts
    1,185

    Re: In VB.NET, Error: Unable to determine decimal

    I know the Implict Conversions in VB.NET. I have tried to explain you by giving an example below. In that example, one of type double and the other integer. The double data type is assigned a value and is converted to integer type. When you run the code the result displayed is an integer value, in this case the value displayed is 132 instead of 132.31223. Here is the code for that
    Code:
    Imports System.Console
    Module Module1
    
    Sub Main()
    Dim d=132.31223 as Double
    Dim i as Integer
    i=d
    WriteLine("Integer value is" & i)
    End Sub
    
    End Module

Similar Threads

  1. Replies: 3
    Last Post: 17-01-2014, 10:36 AM
  2. Unable to determine the SATA ports on Dell Vostro 460
    By Kuhuk in forum Hardware Peripherals
    Replies: 6
    Last Post: 12-11-2011, 05:27 AM
  3. Replies: 1
    Last Post: 24-11-2010, 04:16 AM
  4. Replies: 4
    Last Post: 08-04-2010, 04:24 AM
  5. jQuery unable to determine if a tag is empty
    By MKAIF in forum Software Development
    Replies: 5
    Last Post: 24-02-2010, 10:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,721,926,956.84496 seconds with 17 queries