Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Round Function

Round Function

Scheduled Pinned Locked Moved Visual Basic
helpdatabase
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PremalathaP
    wrote on last edited by
    #1

    The following code in VB shows the error : "Undefined function 'round' in expression". [CODE] DataEnvironment1.Commands(1).CommandText="Select Round(Altitude,2) from Alt" [\CODE] Here, Altitude is a variable of type 'Number-Double' Alt is a table in MS-Access Database. Help me regarding this. Thanks in advance. -- modified at 2:18 Wednesday 1st February, 2006

    L G 3 Replies Last reply
    0
    • P PremalathaP

      The following code in VB shows the error : "Undefined function 'round' in expression". [CODE] DataEnvironment1.Commands(1).CommandText="Select Round(Altitude,2) from Alt" [\CODE] Here, Altitude is a variable of type 'Number-Double' Alt is a table in MS-Access Database. Help me regarding this. Thanks in advance. -- modified at 2:18 Wednesday 1st February, 2006

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Try: DataEnvironment1.Commands(1).CommandText="Select Round(" & Altitude & ", 2) from Alt"

      P 1 Reply Last reply
      0
      • L Lost User

        Try: DataEnvironment1.Commands(1).CommandText="Select Round(" & Altitude & ", 2) from Alt"

        P Offline
        P Offline
        PremalathaP
        wrote on last edited by
        #3

        Altitude is not a variable used in VB. Altitude is a Field in table Alt.

        1 Reply Last reply
        0
        • P PremalathaP

          The following code in VB shows the error : "Undefined function 'round' in expression". [CODE] DataEnvironment1.Commands(1).CommandText="Select Round(Altitude,2) from Alt" [\CODE] Here, Altitude is a variable of type 'Number-Double' Alt is a table in MS-Access Database. Help me regarding this. Thanks in advance. -- modified at 2:18 Wednesday 1st February, 2006

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          I tried using Round in a query in Access, and that works fine, just as expected. Are you sure that it is an Access database that the connection is connecting to? Are you sure that the query that you have shown is causing the error? The code you show can never cause that error by itself, there has to be som code that runs the query also. --- b { font-weight: normal; }

          P 1 Reply Last reply
          0
          • G Guffa

            I tried using Round in a query in Access, and that works fine, just as expected. Are you sure that it is an Access database that the connection is connecting to? Are you sure that the query that you have shown is causing the error? The code you show can never cause that error by itself, there has to be som code that runs the query also. --- b { font-weight: normal; }

            P Offline
            P Offline
            PremalathaP
            wrote on last edited by
            #5

            It is in access database only. I am getting the values if i use the query without using round function. It is showing error when i use the round function

            G 1 Reply Last reply
            0
            • P PremalathaP

              It is in access database only. I am getting the values if i use the query without using round function. It is showing error when i use the round function

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              What is the complete error message? What databasedriver are you using, e.g. what does your connectionstring look like? --- b { font-weight: normal; }

              P 1 Reply Last reply
              0
              • G Guffa

                What is the complete error message? What databasedriver are you using, e.g. what does your connectionstring look like? --- b { font-weight: normal; }

                P Offline
                P Offline
                PremalathaP
                wrote on last edited by
                #7

                Error Message : "Undefined function 'round' in expression". Connection String : Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Premalatha\30_01_06-VrefAnalysis\VrefAnalysis.mdb; Persist Security Info=False Database Driver : Microsofy.Jet.OLEDB.4.0 -- modified at 7:07 Wednesday 1st February, 2006

                1 Reply Last reply
                0
                • P PremalathaP

                  The following code in VB shows the error : "Undefined function 'round' in expression". [CODE] DataEnvironment1.Commands(1).CommandText="Select Round(Altitude,2) from Alt" [\CODE] Here, Altitude is a variable of type 'Number-Double' Alt is a table in MS-Access Database. Help me regarding this. Thanks in advance. -- modified at 2:18 Wednesday 1st February, 2006

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  PremalathaP wrote:

                  Select Round(Altitude,2) from Alt

                  Try: SELECT ROUND(Alt.[Altitute], 2) FROM Alt

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups