|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Syntax error about daAngio.Fill(dsAngio, "AngioInfo")David Source Code: Dim conn As New SqlConnection(strConn) Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) 'Create a dataset Dim dsAngio As New DataSet 'fill in the dataset by adapter daAngio.Fill(dsAngio, "AngioInfo") Dim ok As Boolean = False Error Message: 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 85: Dim dsAngio As New DataSet Line 86: 'fill in the dataset by adapter Line 87: daAngio.Fill(dsAngio, "AngioInfo") Line 88: Line 89: Dim ok As Boolean = False Source File: c:\inetpub\wwwroot\Demo\ShowImages\ShowAngio4Patient.aspx.vb Line: 87 The syntax error is in your sql statement.
If it was a syntax error in your code, this wouldn't compile, meaning it could never run. Show quoteHide quote "david" <da***@discussions.microsoft.com> wrote in message news:82E2E673-4170-4F68-BB91-B6A567F03F76@microsoft.com... > Anyone could give me a hand about this syntax error? Thank you. > David > Source Code: > Dim conn As New SqlConnection(strConn) > Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) > 'Create a dataset > Dim dsAngio As New DataSet > 'fill in the dataset by adapter > daAngio.Fill(dsAngio, "AngioInfo") > Dim ok As Boolean = False > > Error Message: > 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 85: Dim dsAngio As New DataSet > Line 86: 'fill in the dataset by adapter > Line 87: daAngio.Fill(dsAngio, "AngioInfo") > Line 88: > Line 89: Dim ok As Boolean = False > Source File: c:\inetpub\wwwroot\Demo\ShowImages\ShowAngio4Patient.aspx.vb > Line: 87 > > > Thanks. I found the error. When you make a copy/paste, it automatically adds
brakets ( ). David Show quoteHide quote "Marina" wrote: > The syntax error is in your sql statement. > > If it was a syntax error in your code, this wouldn't compile, meaning it > could never run. > > "david" <da***@discussions.microsoft.com> wrote in message > news:82E2E673-4170-4F68-BB91-B6A567F03F76@microsoft.com... > > Anyone could give me a hand about this syntax error? Thank you. > > David > > Source Code: > > Dim conn As New SqlConnection(strConn) > > Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) > > 'Create a dataset > > Dim dsAngio As New DataSet > > 'fill in the dataset by adapter > > daAngio.Fill(dsAngio, "AngioInfo") > > Dim ok As Boolean = False > > > > Error Message: > > 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 85: Dim dsAngio As New DataSet > > Line 86: 'fill in the dataset by adapter > > Line 87: daAngio.Fill(dsAngio, "AngioInfo") > > Line 88: > > Line 89: Dim ok As Boolean = False > > Source File: c:\inetpub\wwwroot\Demo\ShowImages\ShowAngio4Patient.aspx.vb > > Line: 87 > > > > > > > > >
Other interesting topics
possible java script question
Thread not working Timer control PostBack Events on Server Running .NET 1.1 and 2.0 FxCop App Security asp:Wizard inside of a asp:FormView breaks two-way databinding Extend the Membership Provider to include more user data Preserve Data to Edit on DataGrid When Filtering Directory.CreateDirectory - Could not find a part of the path Check textbox value... |
|||||||||||||||||||||||