By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

Syntax error about daAngio.Fill(dsAngio, "AngioInfo")

P: n/a
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\ShowAngio4Patie nt.aspx.vb
Line: 87

Jan 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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:82**********************************@microsof t.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\ShowAngio4Patie nt.aspx.vb
Line: 87

Jan 5 '06 #2

P: n/a
Thanks. I found the error. When you make a copy/paste, it automatically adds
brakets ( ).

David
"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:82**********************************@microsof t.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\ShowAngio4Patie nt.aspx.vb
Line: 87


Jan 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.