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. Web Development
  3. ASP.NET
  4. error.. :(

error.. :(

Scheduled Pinned Locked Moved ASP.NET
sysadmindata-structuresdebugginghelpquestion
9 Posts 5 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.
  • R Offline
    R Offline
    R Thomas 0
    wrote on last edited by
    #1

    any idea whats this error mean? :( Server Error in '/Te' Application. -------------------------------------------------------------------------------- Line 1: Incorrect syntax near ')'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near ')'. Source Error: Line 28: ds = New DataSet("ColumnData") Line 29: conn.Open() Line 30: adapter.Fill(ds, "default") Line 31: conn.Close() Line 32: Return ds Source File: C:\Inetpub\wwwroot\Te\ReportClass.vb Line: 30 tks... "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

    R Z 2 Replies Last reply
    0
    • R R Thomas 0

      any idea whats this error mean? :( Server Error in '/Te' Application. -------------------------------------------------------------------------------- Line 1: Incorrect syntax near ')'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near ')'. Source Error: Line 28: ds = New DataSet("ColumnData") Line 29: conn.Open() Line 30: adapter.Fill(ds, "default") Line 31: conn.Close() Line 32: Return ds Source File: C:\Inetpub\wwwroot\Te\ReportClass.vb Line: 30 tks... "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

      R Offline
      R Offline
      R Thomas 0
      wrote on last edited by
      #2

      this is the full function Public Function GetColumns(ByVal table As String) As DataSet Dim sqlStr As String Dim dr As DataRow sqlStr = "SELECT COLUMN_NAME FROM(Information_Schema.Columns) WHERE (Table_Name = '" & table & "')" conn = New SqlConnection(connectionString) cmd = New SqlCommand(sqlStr, conn) adapter = New SqlDataAdapter(cmd) ds = New DataSet("ColumnData") conn.Open() adapter.Fill(ds, "default") conn.Close() Return ds End Function "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

      M 1 Reply Last reply
      0
      • R R Thomas 0

        any idea whats this error mean? :( Server Error in '/Te' Application. -------------------------------------------------------------------------------- Line 1: Incorrect syntax near ')'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near ')'. Source Error: Line 28: ds = New DataSet("ColumnData") Line 29: conn.Open() Line 30: adapter.Fill(ds, "default") Line 31: conn.Close() Line 32: Return ds Source File: C:\Inetpub\wwwroot\Te\ReportClass.vb Line: 30 tks... "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

        Z Offline
        Z Offline
        Zeke Le
        wrote on last edited by
        #3

        It's the sytax error on your SQL query not the program. Zeke.

        R 1 Reply Last reply
        0
        • Z Zeke Le

          It's the sytax error on your SQL query not the program. Zeke.

          R Offline
          R Offline
          R Thomas 0
          wrote on last edited by
          #4

          any idea how to correct the staement??? "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

          G 1 Reply Last reply
          0
          • R R Thomas 0

            this is the full function Public Function GetColumns(ByVal table As String) As DataSet Dim sqlStr As String Dim dr As DataRow sqlStr = "SELECT COLUMN_NAME FROM(Information_Schema.Columns) WHERE (Table_Name = '" & table & "')" conn = New SqlConnection(connectionString) cmd = New SqlCommand(sqlStr, conn) adapter = New SqlDataAdapter(cmd) ds = New DataSet("ColumnData") conn.Open() adapter.Fill(ds, "default") conn.Close() Return ds End Function "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

            M Offline
            M Offline
            Mazdak
            wrote on last edited by
            #5

            First: You don't need open connection when you fill dataset, so remove line 30,31. And Second this is your problem: Remove the parantess near Information_Schema.Columns. Mazy You're face to face, With the man who sold the world - David Bowie

            N 1 Reply Last reply
            0
            • M Mazdak

              First: You don't need open connection when you fill dataset, so remove line 30,31. And Second this is your problem: Remove the parantess near Information_Schema.Columns. Mazy You're face to face, With the man who sold the world - David Bowie

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              He doesn't necessarily need to remove the open connection statement. If the connection hasn't been opened the DataAdapter will do so before Fill.

              M 1 Reply Last reply
              0
              • R R Thomas 0

                any idea how to correct the staement??? "Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18

                G Offline
                G Offline
                Guillermo Rivero
                wrote on last edited by
                #7

                SELECT COLUMN_NAME FROM Information_Schema.Columns

                Free your mind...

                1 Reply Last reply
                0
                • N Not Active

                  He doesn't necessarily need to remove the open connection statement. If the connection hasn't been opened the DataAdapter will do so before Fill.

                  M Offline
                  M Offline
                  Mazdak
                  wrote on last edited by
                  #8

                  I didn't say the problem come from there, his problem is about his query, you can test it in Query Analyzer. Anyway, thank for the comment. Mazy You're face to face, With the man who sold the world - David Bowie

                  N 1 Reply Last reply
                  0
                  • M Mazdak

                    I didn't say the problem come from there, his problem is about his query, you can test it in Query Analyzer. Anyway, thank for the comment. Mazy You're face to face, With the man who sold the world - David Bowie

                    N Offline
                    N Offline
                    Not Active
                    wrote on last edited by
                    #9

                    First: You don't need open connection when you fill dataset, so remove line 30,31. Nor did I say it was either, only pointing out that this statement isn't necessary correct.

                    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